-
Notifications
You must be signed in to change notification settings - Fork 95
/
book-text.json
21 lines (21 loc) · 1.7 KB
/
book-text.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"name": "book-text",
"type": "registry:ui",
"registryDependencies": [],
"dependencies": [
"motion"
],
"devDependencies": [],
"tailwind": {},
"cssVars": {
"light": {},
"dark": {}
},
"files": [
{
"path": "book-text.tsx",
"content": "'use client';\n\nimport { motion, useAnimation } from 'motion/react';\n\nconst BookTextIcon = () => {\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 <motion.svg\n animate={controls}\n variants={{\n animate: {\n scale: [1, 1.04, 1],\n rotate: [0, -8, 8, -8, 0],\n y: [0, -2, 0],\n transition: {\n duration: 0.6,\n ease: 'easeInOut',\n times: [0, 0.2, 0.5, 0.8, 1],\n },\n },\n normal: {\n scale: 1,\n rotate: 0,\n y: 0,\n },\n }}\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=\"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20\" />\n <path d=\"M8 11h8\" />\n <path d=\"M8 7h6\" />\n </motion.svg>\n </div>\n );\n};\n\nexport { BookTextIcon };\n",
"type": "registry:ui"
}
]
}