Skip to content

Commit 570ce91

Browse files
hot-fix(): changed input size prop due to build issues
1 parent 4ab3e8d commit 570ce91

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/components/UI/Input/Input.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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> = {

src/components/UI/Input/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export type InputIconPositionType = 'left' | 'right';
77
export 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;

0 commit comments

Comments
 (0)