返回 oh-my-ppt
Input.tsx
根目录 / src / renderer / src / components / ui / Input.tsx
1 import { cn } from '@renderer/lib/utils'
2 import React from 'react'
3
4 export const Input = React.forwardRef<HTMLInputElement, React.InputHTMLAttributes<HTMLInputElement>>(
5 ({ className, ...props }, ref) => {
6 return (
7 <input
8 ref={ref}
9 className={cn(
10 'soft-input flex h-11 w-full rounded-lg px-4 py-2 text-sm text-foreground',
11 'ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium',
12 'placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2',
13 'focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50',
14 className
15 )}
16 {...props}
17 />
18 )
19 }
20 )
21
22 Input.displayName = 'Input'
23
24 export function Textarea({ className, ...props }: React.TextareaHTMLAttributes<HTMLTextAreaElement>) {
25 return (
26 <textarea
27 className={cn(
28 'soft-input flex min-h-[80px] w-full rounded-lg px-4 py-3 text-sm text-foreground',
29 'placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2',
30 'focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50',
31 className
32 )}
33 {...props}
34 />
35 )
36 }
37
37 lines Plain Text