-
Notifications
You must be signed in to change notification settings - Fork 95
/
cctv.json
21 lines (21 loc) · 2.03 KB
/
cctv.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"name": "cctv",
"type": "registry:ui",
"registryDependencies": [],
"dependencies": [
"motion"
],
"devDependencies": [],
"tailwind": {},
"cssVars": {
"light": {},
"dark": {}
},
"files": [
{
"path": "cctv.tsx",
"content": "'use client';\n\nimport type { Variants } from 'motion/react';\nimport { motion, useAnimation } from 'motion/react';\n\nconst dotVariants: Variants = {\n normal: { opacity: 1 },\n animate: {\n opacity: [1, 0, 1],\n transition: {\n duration: 1,\n repeat: Infinity,\n },\n },\n};\n\nconst cctvVariants: Variants = {\n normal: { rotate: 0 },\n animate: {\n rotate: [0, -15, 10, 0],\n originX: '9px',\n originY: '15px',\n transition: {\n duration: 2,\n ease: 'easeInOut',\n },\n },\n};\n\nconst CctvIcon = () => {\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.g variants={cctvVariants} animate={controls}>\n <path d=\"M16.75 12h3.632a1 1 0 0 1 .894 1.447l-2.034 4.069a1 1 0 0 1-1.708.134l-2.124-2.97\" />\n <path d=\"M17.106 9.053a1 1 0 0 1 .447 1.341l-3.106 6.211a1 1 0 0 1-1.342.447L3.61 12.3a2.92 2.92 0 0 1-1.3-3.91L3.69 5.6a2.92 2.92 0 0 1 3.92-1.3z\" />\n <motion.path d=\"M7 9h.01\" variants={dotVariants} animate={controls} />\n </motion.g>\n <path d=\"M2 19h3.76a2 2 0 0 0 1.8-1.1L9 15\" />\n <path d=\"M2 21v-4\" />\n </svg>\n </div>\n );\n};\n\nexport { CctvIcon };\n",
"type": "registry:ui"
}
]
}