2023-05-18 11:09:31 -07:00
|
|
|
import * as React from 'react';
|
2023-03-03 15:52:06 -05:00
|
|
|
|
2023-05-18 11:09:31 -07:00
|
|
|
import { cn } from '../../utils';
|
2023-03-03 15:52:06 -05:00
|
|
|
|
2023-05-18 11:09:31 -07:00
|
|
|
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
|
2023-03-03 15:52:06 -05:00
|
|
|
|
2023-05-18 11:09:31 -07:00
|
|
|
const Input = React.forwardRef<HTMLInputElement, InputProps>(({ className, ...props }, ref) => {
|
|
|
|
|
return (
|
|
|
|
|
<input
|
|
|
|
|
className={cn(
|
|
|
|
|
'flex h-10 w-full rounded-md border border-slate-300 bg-transparent px-3 py-2 text-sm placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-700 dark:text-slate-50 dark:focus:ring-slate-400 dark:focus:ring-offset-slate-900',
|
2023-07-14 09:36:49 -04:00
|
|
|
className,
|
2023-05-18 11:09:31 -07:00
|
|
|
)}
|
|
|
|
|
ref={ref}
|
|
|
|
|
{...props}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
Input.displayName = 'Input';
|
2023-03-03 15:52:06 -05:00
|
|
|
|
2023-05-18 11:09:31 -07:00
|
|
|
export { Input };
|