From 40972aeb0aa926d982a147429fbdd7c4cf19aa23 Mon Sep 17 00:00:00 2001 From: felixfeng33 Date: Tue, 19 Nov 2024 08:29:16 +0000 Subject: [PATCH] docs --- apps/www/public/r/styles/default/input.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/www/public/r/styles/default/input.json b/apps/www/public/r/styles/default/input.json index cf6b92f863..3f4858d2ac 100644 --- a/apps/www/public/r/styles/default/input.json +++ b/apps/www/public/r/styles/default/input.json @@ -5,7 +5,7 @@ }, "files": [ { - "content": "import { withVariants } from '@udecode/cn';\nimport { type VariantProps, cva } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nexport const inputVariants = cva(\n 'flex w-full rounded-md bg-transparent text-sm file:border-0 file:bg-background file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n {\n defaultVariants: {\n h: 'md',\n variant: 'default',\n },\n variants: {\n h: {\n md: 'h-10 px-3 py-2',\n sm: 'h-[28px] px-1.5 py-1',\n },\n variant: {\n default:\n 'border border-input ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',\n ghost: 'border-none focus-visible:ring-transparent',\n },\n },\n }\n);\n\nexport type InputProps = React.ComponentPropsWithoutRef<'input'> &\n VariantProps;\n\nexport const Input = withVariants('input', inputVariants, ['variant', 'h']);\n\nexport type FloatingInputProps = InputProps & {\n label: string;\n};\n\nexport function FloatingInput({\n id,\n className,\n label,\n ...props\n}: FloatingInputProps) {\n return (\n <>\n \n {label}\n \n \n \n );\n}\n", + "content": "import React from 'react';\n\nimport { cn, withVariants } from '@udecode/cn';\nimport { type VariantProps, cva } from 'class-variance-authority';\n\nexport const inputVariants = cva(\n 'flex w-full rounded-md bg-transparent text-sm file:border-0 file:bg-background file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',\n {\n defaultVariants: {\n h: 'md',\n variant: 'default',\n },\n variants: {\n h: {\n md: 'h-10 px-3 py-2',\n sm: 'h-[28px] px-1.5 py-1',\n },\n variant: {\n default:\n 'border border-input ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',\n ghost: 'border-none focus-visible:ring-transparent',\n },\n },\n }\n);\n\nexport type InputProps = React.ComponentPropsWithoutRef<'input'> &\n VariantProps;\n\nexport const Input = withVariants('input', inputVariants, ['variant', 'h']);\n\nexport type FloatingInputProps = InputProps & {\n label: string;\n};\n\nexport function FloatingInput({\n id,\n className,\n label,\n ...props\n}: FloatingInputProps) {\n return (\n <>\n \n {label}\n \n \n \n );\n}\n", "path": "plate-ui/input.tsx", "target": "components/plate-ui/input.tsx", "type": "registry:ui"