24 lines
2.6 KiB
JSON
24 lines
2.6 KiB
JSON
{
|
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
"name": "gavel-icon",
|
|
"type": "registry:ui",
|
|
"title": "Gavel Icon",
|
|
"description": "Gavel icon component.",
|
|
"dependencies": [
|
|
"motion"
|
|
],
|
|
"files": [
|
|
{
|
|
"path": "registry/icons/gavel/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 GavelProps = IconProps<keyof typeof animations>;\n\nconst animations = {\n default: {\n group: {\n initial: {\n rotate: 0,\n },\n animate: {\n transformOrigin: 'bottom left',\n rotate: [0, 30, -5, 0],\n },\n },\n path1: {},\n path2: {},\n path3: {},\n } satisfies Record<string, Variants>,\n} as const;\n\nfunction IconComponent({ size, ...props }: GavelProps) {\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 variants={variants.group}\n initial=\"initial\"\n animate={controls}\n {...props}\n >\n <motion.path\n d=\"m14.5 12.5-8 8a2.119 2.119 0 1 1-3-3l8-8\"\n variants={variants.path1}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"m16 16 6-6\"\n variants={variants.path2}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"m8 8 6-6\"\n variants={variants.path3}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"m9 7 8 8\"\n variants={variants.path4}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"m21 11-8-8\"\n variants={variants.path5}\n initial=\"initial\"\n animate={controls}\n />\n </motion.svg>\n );\n}\n\nfunction Gavel(props: GavelProps) {\n return <IconWrapper icon={IconComponent} {...props} />;\n}\n\nexport {\n animations,\n Gavel,\n Gavel as GavelIcon,\n type GavelProps,\n type GavelProps as GavelIconProps,\n};\n",
|
|
"type": "registry:ui",
|
|
"target": "components/animate-ui/icons/gavel.tsx"
|
|
}
|
|
],
|
|
"meta": {
|
|
"keywords": [
|
|
"mallet",
|
|
"hammer"
|
|
]
|
|
}
|
|
} |