Skip to content

Commit 6c0ff81

Browse files
committed
wip
1 parent 7d87595 commit 6c0ff81

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"build": "next build",
88
"start": "next start",
99
"lint": "prettier --write . && eslint --fix .",
10-
"precommit": "tsx scripts/registry-build.ts"
10+
"gen-cli": "tsx scripts/registry-build.ts"
1111
},
1212
"dependencies": {
1313
"@openpanel/nextjs": "^1.0.5",

public/c/x.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "x",
3+
"type": "registry:ui",
4+
"registryDependencies": [],
5+
"dependencies": [
6+
"motion"
7+
],
8+
"devDependencies": [],
9+
"tailwind": {},
10+
"cssVars": {
11+
"light": {},
12+
"dark": {}
13+
},
14+
"files": [
15+
{
16+
"path": "x.tsx",
17+
"content": "'use client';\n\nimport type { Variants } from 'motion/react';\nimport { motion, useAnimation } from 'motion/react';\n\nconst pathVariants: Variants = {\n normal: {\n opacity: 1,\n pathLength: 1,\n },\n animate: {\n opacity: [0, 1],\n pathLength: [0, 1],\n },\n};\n\nconst XIcon = () => {\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=\"24\"\n height=\"24\"\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={pathVariants}\n animate={controls}\n d=\"M18 6 6 18\"\n />\n <motion.path\n transition={{ delay: 0.2 }}\n variants={pathVariants}\n animate={controls}\n d=\"m6 6 12 12\"\n />\n </svg>\n </div>\n );\n};\n\nexport { XIcon };\n",
18+
"type": "registry:ui"
19+
}
20+
]
21+
}

0 commit comments

Comments
 (0)