25 lines
2.7 KiB
JSON
25 lines
2.7 KiB
JSON
{
|
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
"name": "thumbs-up-icon",
|
|
"type": "registry:ui",
|
|
"title": "Thumbs Up Icon",
|
|
"description": "Thumbs up icon component.",
|
|
"dependencies": [
|
|
"motion"
|
|
],
|
|
"files": [
|
|
{
|
|
"path": "registry/icons/thumbs-up/index.tsx",
|
|
"content": "'use client';\n\nimport * as React from 'react';\nimport { motion, type Variants } from 'motion/react';\n\nimport {\n getVariants,\n useAnimateIconContext,\n IconWrapper,\n type IconProps,\n} from '@/components/animate-ui/icons/icon';\n\ntype ThumbsUpProps = IconProps<keyof typeof animations>;\n\nconst animations = {\n default: {\n group: {\n initial: {\n rotate: 0,\n },\n animate: {\n rotate: [0, -20, -12],\n transformOrigin: 'bottom left',\n transition: {\n duration: 0.4,\n ease: 'easeInOut',\n },\n },\n },\n path1: {},\n path2: {},\n } satisfies Record<string, Variants>,\n 'default-loop': {\n group: {\n initial: {\n rotate: 0,\n },\n animate: {\n rotate: [0, -20, 5, 0],\n transformOrigin: 'bottom left',\n transition: {\n duration: 0.8,\n ease: 'easeInOut',\n },\n },\n },\n path1: {},\n path2: {},\n } satisfies Record<string, Variants>,\n} as const;\n\nfunction IconComponent({ size, ...props }: ThumbsUpProps) {\n const { controls } = useAnimateIconContext();\n const variants = getVariants(animations);\n\n return (\n <motion.svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n variants={variants.group}\n initial=\"initial\"\n animate={controls}\n {...props}\n >\n <motion.path\n d=\"M7 10v12\"\n variants={variants.path1}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z\"\n variants={variants.path2}\n initial=\"initial\"\n animate={controls}\n />\n </motion.svg>\n );\n}\n\nfunction ThumbsUp(props: ThumbsUpProps) {\n return <IconWrapper icon={IconComponent} {...props} />;\n}\n\nexport {\n animations,\n ThumbsUp,\n ThumbsUp as ThumbsUpIcon,\n type ThumbsUpProps,\n type ThumbsUpProps as ThumbsUpIconProps,\n};\n",
|
|
"type": "registry:ui",
|
|
"target": "components/animate-ui/icons/thumbs-up.tsx"
|
|
}
|
|
],
|
|
"meta": {
|
|
"keywords": [
|
|
"like",
|
|
"good",
|
|
"emotion"
|
|
]
|
|
}
|
|
} |