File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const Input: FC<IInputProps> = ({
55 label,
66 wrapperClassName = '' ,
77 labelClassName = '' ,
8- size = 'sm' ,
8+ inputElSize = 'sm' ,
99 rounded = 'default' ,
1010 icon,
1111 iconPosition = 'right' ,
@@ -24,7 +24,7 @@ const Input: FC<IInputProps> = ({
2424 xl : `${ iconPosition === 'left' ? 'pl-8 pr-6' : 'pl-6 pr-8' } py-3 text-xl` ,
2525 } ;
2626
27- return iconSizeMapping [ size ] || iconSizeMapping . md ;
27+ return iconSizeMapping [ inputElSize ] || iconSizeMapping . md ;
2828 }
2929
3030 const sizeMapping : Record < InputSizeType , string > = {
@@ -35,8 +35,8 @@ const Input: FC<IInputProps> = ({
3535 xl : 'px-6 py-3 text-xl' , // not stable, need to adjust padding to accommodate icon
3636 } ;
3737
38- return sizeMapping [ size ] || sizeMapping . md ;
39- } , [ size ] ) ;
38+ return sizeMapping [ inputElSize ] || sizeMapping . md ;
39+ } , [ inputElSize ] ) ;
4040
4141 const inputRounded = useMemo ( ( ) => {
4242 const roundedMapping : Record < InputRoundedType , string > = {
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export type InputIconPositionType = 'left' | 'right';
77export interface IInputProps extends InputHTMLAttributes < HTMLInputElement > {
88 wrapperClassName ?: string ;
99 labelClassName ?: string ;
10- size ?: InputSizeType ;
10+ inputElSize ?: InputSizeType ;
1111 rounded ?: InputRoundedType ;
1212 icon ?: ReactNode ;
1313 iconPosition ?: InputIconPositionType ;
You can’t perform that action at this time.
0 commit comments