-
Notifications
You must be signed in to change notification settings - Fork 97
/
Copy pathcalendar-cog.json
21 lines (21 loc) · 1.96 KB
/
calendar-cog.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"name": "calendar-cog",
"type": "registry:ui",
"registryDependencies": [],
"dependencies": [
"motion"
],
"devDependencies": [],
"tailwind": {},
"cssVars": {
"light": {},
"dark": {}
},
"files": [
{
"path": "calendar-cog.tsx",
"content": "'use client';\n\nimport type { Variants } from 'motion/react';\nimport { motion, useAnimation } from 'motion/react';\n\nconst gVariants: Variants = {\n normal: { rotate: 0 },\n animate: { rotate: 180 },\n};\n\nconst CalendarCogIcon = () => {\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 <path d=\"M21 10.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6\" />\n <path d=\"M16 2v4\" />\n <path d=\"M3 10h18\" />\n <path d=\"M8 2v4\" />\n <motion.g\n transition={{ type: 'spring', stiffness: 50, damping: 10 }}\n variants={gVariants}\n animate={controls}\n >\n <path d=\"m15.2 16.9-.9-.4\" />\n <path d=\"m15.2 19.1-.9.4\" />\n <path d=\"m16.9 15.2-.4-.9\" />\n <path d=\"m16.9 20.8-.4.9\" />\n <path d=\"m19.5 14.3-.4.9\" />\n <path d=\"m19.5 21.7-.4-.9\" />\n <path d=\"m21.7 16.5-.9.4\" />\n <path d=\"m21.7 19.5-.9-.4\" />\n <circle cx=\"18\" cy=\"18\" r=\"3\" />\n </motion.g>\n </svg>\n </div>\n );\n};\n\nexport { CalendarCogIcon };\n",
"type": "registry:ui"
}
]
}