33 lines
2.7 KiB
JSON
33 lines
2.7 KiB
JSON
{
|
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
"name": "disc-3-icon",
|
|
"type": "registry:ui",
|
|
"title": "Disc 3 Icon",
|
|
"description": "Disc 3 icon component.",
|
|
"dependencies": [
|
|
"motion"
|
|
],
|
|
"files": [
|
|
{
|
|
"path": "registry/icons/disc-3/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 Disc3Props = IconProps<keyof typeof animations>;\n\nconst animations = {\n default: {\n group: {\n initial: { rotate: 0 },\n animate: {\n rotate: 360,\n transition: {\n duration: 1,\n ease: 'linear',\n repeat: Infinity,\n repeatType: 'loop',\n },\n },\n },\n circle1: {},\n circle2: {},\n path1: {},\n path2: {},\n } satisfies Record<string, Variants>,\n} as const;\n\nfunction IconComponent({ size, ...props }: Disc3Props) {\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.circle\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n variants={variants.circle1}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M6 12c0-1.7.7-3.2 1.8-4.2\"\n variants={variants.path1}\n initial=\"initial\"\n animate={controls}\n />\n <motion.circle\n cx=\"12\"\n cy=\"12\"\n r=\"2\"\n variants={variants.circle2}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M18 12c0 1.7-.7 3.2-1.8 4.2\"\n variants={variants.path2}\n initial=\"initial\"\n animate={controls}\n />\n </motion.svg>\n );\n}\n\nfunction Disc3(props: Disc3Props) {\n return <IconWrapper icon={IconComponent} {...props} />;\n}\n\nexport {\n animations,\n Disc3,\n Disc3 as Disc3Icon,\n type Disc3Props,\n type Disc3Props as Disc3IconProps,\n};\n",
|
|
"type": "registry:ui",
|
|
"target": "components/animate-ui/icons/disc-3.tsx"
|
|
}
|
|
],
|
|
"meta": {
|
|
"keywords": [
|
|
"album",
|
|
"album",
|
|
"vinyl",
|
|
"record",
|
|
"cd",
|
|
"dvd",
|
|
"format",
|
|
"dj",
|
|
"spin",
|
|
"rotate",
|
|
"rpm"
|
|
]
|
|
}
|
|
} |