29 lines
3.1 KiB
JSON
29 lines
3.1 KiB
JSON
{
|
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
"name": "refresh-cw-icon",
|
|
"type": "registry:ui",
|
|
"title": "Refresh Cw Icon",
|
|
"description": "Refresh cw icon component.",
|
|
"dependencies": [
|
|
"motion"
|
|
],
|
|
"files": [
|
|
{
|
|
"path": "registry/icons/refresh-cw/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 RefreshCwProps = IconProps<keyof typeof animations>;\n\nconst animations = {\n default: {\n group: {\n initial: {\n rotate: 0,\n transition: { type: 'spring', stiffness: 150, damping: 25 },\n },\n animate: {\n rotate: 45,\n transition: { type: 'spring', stiffness: 150, damping: 25 },\n },\n },\n path1: {},\n path2: {},\n path3: {},\n path4: {},\n } satisfies Record<string, Variants>,\n rotate: {\n group: {\n initial: {\n rotate: 0,\n transition: { type: 'spring', stiffness: 100, damping: 25 },\n },\n animate: {\n rotate: 360,\n transition: { type: 'spring', stiffness: 100, damping: 25 },\n },\n },\n path1: {},\n path2: {},\n path3: {},\n path4: {},\n } satisfies Record<string, Variants>,\n} as const;\n\nfunction IconComponent({ size, ...props }: RefreshCwProps) {\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=\"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8\"\n variants={variants.path1}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M21 3v5h-5\"\n variants={variants.path2}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16\"\n variants={variants.path3}\n initial=\"initial\"\n animate={controls}\n />\n <motion.path\n d=\"M8 16H3v5\"\n variants={variants.path4}\n initial=\"initial\"\n animate={controls}\n />\n </motion.svg>\n );\n}\n\nfunction RefreshCw(props: RefreshCwProps) {\n return <IconWrapper icon={IconComponent} {...props} />;\n}\n\nexport {\n animations,\n RefreshCw,\n RefreshCw as RefreshCwIcon,\n type RefreshCwProps,\n type RefreshCwProps as RefreshCwIconProps,\n};\n",
|
|
"type": "registry:ui",
|
|
"target": "components/animate-ui/icons/refresh-cw.tsx"
|
|
}
|
|
],
|
|
"meta": {
|
|
"keywords": [
|
|
"rotate",
|
|
"arrows",
|
|
"synchronise",
|
|
"reload",
|
|
"rerun",
|
|
"circular",
|
|
"cycle"
|
|
]
|
|
}
|
|
} |