structure

This commit is contained in:
hamid zarghami
2024-12-23 15:09:11 +03:30
commit 6cb43e42b2
36 changed files with 5071 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
import { FC, InputHTMLAttributes } from 'react'
import { clx } from '../helpers/utils';
type Variant = "floating_outlined" | "primary" | "search";
type Props = {
label: string;
className?: string;
variant?: Variant;
error_text?: string;
onEnter?: () => void;
unit?: string;
seprator?: boolean;
isNotRequired?: boolean;
} & InputHTMLAttributes<HTMLInputElement>
const Input: FC<Props> = (props: Props) => {
const inputClass = clx(
'w-full h-12 text-black block px-4 rounded-xl mt-2 border border-border',
props.readOnly && 'bg-gray-100',
props.className
);
return (
<div className='w-full'>
<label className='text-sm'>
{props.label}
</label>
<input {...props} className={inputClass} />
</div>
)
}
export default Input