Fortura/apps/www/public/r/panel-top-icon.json
2025-08-20 04:12:49 -06:00

28 lines
2.3 KiB
JSON

{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "panel-top-icon",
"type": "registry:ui",
"title": "Panel Top Icon",
"description": "Panel top icon component.",
"dependencies": [
"motion"
],
"files": [
{
"path": "registry/icons/panel-top/index.tsx",
"content": "'use client';\n\nimport * as React from 'react';\nimport { motion, type Variants } from 'motion/react';\n\nimport {\n getVariants,\n useAnimateIconContext,\n IconWrapper,\n type IconProps,\n} from '@/components/animate-ui/icons/icon';\n\ntype PanelTopProps = IconProps<keyof typeof animations>;\n\nconst animations = {\n default: {\n rect: {},\n line: {\n initial: { x1: 3, y1: 9, x2: 21, y2: 9 },\n animate: {\n x1: 3,\n y1: 7,\n x2: 21,\n y2: 7,\n transition: { type: 'spring', damping: 20, stiffness: 200 },\n },\n },\n } satisfies Record<string, Variants>,\n} as const;\n\nfunction IconComponent({ size, ...props }: PanelTopProps) {\n const { controls } = useAnimateIconContext();\n const variants = getVariants(animations);\n\n return (\n <motion.svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n {...props}\n >\n <motion.rect\n width={18}\n height={18}\n x={3}\n y={3}\n rx={2}\n ry={2}\n variants={variants.rect}\n initial=\"initial\"\n animate={controls}\n />\n <motion.line\n x1={3}\n y1={9}\n x2={21}\n y2={9}\n variants={variants.line}\n initial=\"initial\"\n animate={controls}\n />\n </motion.svg>\n );\n}\n\nfunction PanelTop(props: PanelTopProps) {\n return <IconWrapper icon={IconComponent} {...props} />;\n}\n\nexport {\n animations,\n PanelTop,\n PanelTop as PanelTopIcon,\n type PanelTopProps,\n type PanelTopProps as PanelTopIconProps,\n};\n",
"type": "registry:ui",
"target": "components/animate-ui/icons/panel-top.tsx"
}
],
"meta": {
"keywords": [
"sidebar",
"panel",
"top",
"menu",
"drawer",
"navigation"
]
}
}