-
Notifications
You must be signed in to change notification settings - Fork 97
/
Copy pathbluetooth-searching.json
21 lines (21 loc) · 2.1 KB
/
bluetooth-searching.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"name": "bluetooth-searching",
"type": "registry:ui",
"registryDependencies": [],
"dependencies": [
"motion"
],
"devDependencies": [],
"tailwind": {},
"cssVars": {
"light": {},
"dark": {}
},
"files": [
{
"path": "bluetooth-searching.tsx",
"content": "'use client';\n\nimport type { Variants } from 'motion/react';\nimport { motion, useAnimation } from 'motion/react';\n\nconst pathVariants: Variants = {\n normal: {\n scale: 1,\n transition: {\n repeat: 0,\n },\n },\n animate: {\n scale: [0, 1, 0.8],\n },\n};\n\nconst secondVariants: Variants = {\n normal: {\n opacity: 1,\n },\n animate: {\n opacity: [1, 0.8, 1],\n transition: { repeat: Infinity },\n },\n};\n\nconst BluetoothSearchingIcon = () => {\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 variants={secondVariants}\n animate={controls}\n d=\"m7 7 10 10-5 5V2l5 5L7 17\"\n />\n <motion.path\n variants={pathVariants}\n animate={controls}\n transition={{\n duration: 0.6,\n delay: 0.2,\n repeat: Infinity,\n }}\n d=\"M20.83 14.83a4 4 0 0 0 0-5.66\"\n />\n <motion.path\n variants={pathVariants}\n animate={controls}\n transition={{\n duration: 0.6,\n repeat: Infinity,\n }}\n d=\"M18 12h.01\"\n />\n </svg>\n </div>\n );\n};\n\nexport { BluetoothSearchingIcon };\n",
"type": "registry:ui"
}
]
}