34 lines
2.4 KiB
JSON
34 lines
2.4 KiB
JSON
{
|
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
"name": "chevron-up-icon",
|
|
"type": "registry:ui",
|
|
"title": "Chevron Up Icon",
|
|
"description": "Chevron up icon component.",
|
|
"dependencies": [
|
|
"motion"
|
|
],
|
|
"files": [
|
|
{
|
|
"path": "registry/icons/chevron-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 ChevronUpProps = IconProps<keyof typeof animations>;\n\nconst animations = {\n default: {\n path: {\n initial: {\n y: 0,\n transition: { duration: 0.3, ease: 'easeInOut' },\n },\n animate: {\n y: -4,\n transition: { duration: 0.3, ease: 'easeInOut' },\n },\n },\n } satisfies Record<string, Variants>,\n 'default-loop': {\n path: {\n initial: {\n y: 0,\n },\n animate: {\n y: [0, -4, 0],\n transition: { duration: 0.6, ease: 'easeInOut' },\n },\n },\n } satisfies Record<string, Variants>,\n} as const;\n\nfunction IconComponent({ size, ...props }: ChevronUpProps) {\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=\"m18 15-6-6-6 6\"\n variants={variants.path}\n initial=\"initial\"\n animate={controls}\n />\n </motion.svg>\n );\n}\n\nfunction ChevronUp(props: ChevronUpProps) {\n return <IconWrapper icon={IconComponent} {...props} />;\n}\n\nexport {\n animations,\n ChevronUp,\n ChevronUp as ChevronUpIcon,\n type ChevronUpProps,\n type ChevronUpProps as ChevronUpIconProps,\n};\n",
|
|
"type": "registry:ui",
|
|
"target": "components/animate-ui/icons/chevron-up.tsx"
|
|
}
|
|
],
|
|
"meta": {
|
|
"keywords": [
|
|
"caret",
|
|
"keyboard",
|
|
"mac",
|
|
"control",
|
|
"ctrl",
|
|
"superscript",
|
|
"exponential",
|
|
"power",
|
|
"ahead",
|
|
"fast",
|
|
"^",
|
|
"dropdown"
|
|
]
|
|
}
|
|
} |