30 lines
2.6 KiB
JSON
30 lines
2.6 KiB
JSON
{
|
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
"name": "brush-icon",
|
|
"type": "registry:ui",
|
|
"title": "Brush Icon",
|
|
"description": "Brush icon component.",
|
|
"dependencies": [
|
|
"motion"
|
|
],
|
|
"files": [
|
|
{
|
|
"path": "registry/icons/brush/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 BrushProps = IconProps<keyof typeof animations>;\n\nconst animations = {\n default: {\n group: {\n initial: {\n rotate: 0,\n transition: { duration: 0.6, ease: 'easeInOut' },\n },\n animate: {\n rotate: [0, -6, 6, 0],\n transformOrigin: 'top right',\n transition: { duration: 0.6, ease: 'easeInOut' },\n },\n },\n path1: {},\n path2: {},\n path3: {},\n } satisfies Record<string, Variants>,\n} as const;\n\nfunction IconComponent({ size, ...props }: BrushProps) {\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=\"m11 10 3 3\"\n variants={variants.path1}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M6.5 21A3.5 3.5 0 1 0 3 17.5a2.62 2.62 0 0 1-.708 1.792A1 1 0 0 0 3 21z\"\n variants={variants.path2}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M9.969 17.031 21.378 5.624a1 1 0 0 0-3.002-3.002L6.967 14.031\"\n variants={variants.path3}\n initial=\"initial\"\n animate={controls}\n />\n </motion.svg>\n );\n}\n\nfunction Brush(props: BrushProps) {\n return <IconWrapper icon={IconComponent} {...props} />;\n}\n\nexport {\n animations,\n Brush,\n Brush as BrushIcon,\n type BrushProps,\n type BrushProps as BrushIconProps,\n};\n",
|
|
"type": "registry:ui",
|
|
"target": "components/animate-ui/icons/brush.tsx"
|
|
}
|
|
],
|
|
"meta": {
|
|
"keywords": [
|
|
"clean",
|
|
"sweep",
|
|
"refactor",
|
|
"remove",
|
|
"draw",
|
|
"paint",
|
|
"color",
|
|
"artist"
|
|
]
|
|
}
|
|
} |