28 lines
2.2 KiB
JSON
28 lines
2.2 KiB
JSON
{
|
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
"name": "message-circle-icon",
|
|
"type": "registry:ui",
|
|
"title": "Message Circle Icon",
|
|
"description": "Message circle icon component.",
|
|
"dependencies": [
|
|
"motion"
|
|
],
|
|
"files": [
|
|
{
|
|
"path": "registry/icons/message-circle/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 MessageCircleProps = IconProps<keyof typeof animations>;\n\nconst animations = {\n default: {\n path: {\n initial: {\n rotate: 0,\n },\n animate: {\n transformOrigin: 'bottom left',\n rotate: [0, 8, -8, 2, 0],\n transition: {\n ease: 'easeInOut',\n duration: 0.8,\n times: [0, 0.4, 0.6, 0.8, 1],\n },\n },\n },\n } satisfies Record<string, Variants>,\n} as const;\n\nfunction IconComponent({ size, ...props }: MessageCircleProps) {\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 {...props}\n >\n <motion.path\n d=\"M7.9 20A9 9 0 1 0 4 16.1L2 22Z\"\n variants={variants.path}\n initial=\"initial\"\n animate={controls}\n />\n </motion.svg>\n );\n}\n\nfunction MessageCircle(props: MessageCircleProps) {\n return <IconWrapper icon={IconComponent} {...props} />;\n}\n\nexport {\n animations,\n MessageCircle,\n MessageCircle as MessageCircleIcon,\n type MessageCircleProps,\n type MessageCircleProps as MessageCircleIconProps,\n};\n",
|
|
"type": "registry:ui",
|
|
"target": "components/animate-ui/icons/message-circle.tsx"
|
|
}
|
|
],
|
|
"meta": {
|
|
"keywords": [
|
|
"comment",
|
|
"chat",
|
|
"conversation",
|
|
"dialog",
|
|
"feedback",
|
|
"speech bubble"
|
|
]
|
|
}
|
|
} |