Skip to content

Commit

Permalink
Change inputSize prop to size in Inputv2 component
Browse files Browse the repository at this point in the history
Refactor InputList and Input components
  • Loading branch information
hervedombya committed Jan 18, 2024
1 parent ac28f23 commit 09eee15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/lib/components/inputlist/InputList.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Box } from '../box/Box';
import { Input } from '../inputv2/inputv2';
import { AddButton, SubButton } from './InputButtons';

export type InputListProps<T> = HTMLProps<HTMLInputElement> & {
export type InputListProps<T> = Omit<HTMLProps<HTMLInputElement>, 'size'> & {
ref: RefCallBack;
min?: string | number;
max?: string | number;
Expand Down Expand Up @@ -64,7 +64,7 @@ function InternalInputList<
<Input
id={`${name}[${index}]`}
aria-label={`${name}${index}`}
inputSize={'1/2'}
size="1/2"
value={val}
onChange={(evt) => {
const tempValues = [...value];
Expand Down
8 changes: 4 additions & 4 deletions src/lib/components/inputv2/inputv2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ type Props = {
id: string;
leftIcon?: IconName;
rightIcon?: IconName;
inputSize?: InputSize;
} & InputHTMLAttributes<HTMLInputElement>;
size?: InputSize;
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>;

export const Input = forwardRef<HTMLInputElement, Props>(
(
Expand All @@ -106,7 +106,7 @@ export const Input = forwardRef<HTMLInputElement, Props>(
leftIcon,
rightIcon,
placeholder,
inputSize,
size,
...inputProps
},
ref,
Expand All @@ -122,7 +122,7 @@ export const Input = forwardRef<HTMLInputElement, Props>(
<InputBorder
disabled={!!(disabled || disabledFromFieldContext)}
hasError={!!(error || errorFromFieldContext)}
width={convertSizeToRem(inputSize)}
width={convertSizeToRem(size)}
>
<InputContainer
isContextAvailable={isContextAvailable}
Expand Down

0 comments on commit 09eee15

Please sign in to comment.