-
Notifications
You must be signed in to change notification settings - Fork 97
/
Copy pathchart-pie.json
21 lines (21 loc) · 1.67 KB
/
chart-pie.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"name": "chart-pie",
"type": "registry:ui",
"registryDependencies": [],
"dependencies": [
"motion"
],
"devDependencies": [],
"tailwind": {},
"cssVars": {
"light": {},
"dark": {}
},
"files": [
{
"path": "chart-pie.tsx",
"content": "'use client';\n\nimport type { Variants } from 'motion/react';\nimport { motion, useAnimation } from 'motion/react';\n\nconst pathVariants: Variants = {\n normal: { translateX: 0, translateY: 0 },\n animate: { translateX: 1.1, translateY: -1.1 },\n};\n\nconst ChartPieIcon = () => {\n const controls = useAnimation();\n\n return (\n <div\n className=\"cursor-pointer select-none p-2 hover:bg-accent rounded-md transition-colors duration-200 flex items-center justify-center\"\n onMouseEnter={() => controls.start('animate')}\n onMouseLeave={() => controls.start('normal')}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"28\"\n height=\"28\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <motion.path\n d=\"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z\"\n transition={{\n type: 'spring',\n stiffness: 250,\n damping: 15,\n bounce: 0.6,\n }}\n variants={pathVariants}\n animate={controls}\n />\n <path d=\"M21.21 15.89A10 10 0 1 1 8 2.83\" />\n </svg>\n </div>\n );\n};\n\nexport { ChartPieIcon };\n",
"type": "registry:ui"
}
]
}