Skip to content

Commit

Permalink
Merge pull request #102 from ubie-oss/feat/remove-required-value
Browse files Browse the repository at this point in the history
Make value not required for Input and Textarea
  • Loading branch information
8845musign authored Jun 10, 2024
2 parents 33295a0 + 4c09b7e commit d1eef29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions src/components/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ type Props = {
* @default false
*/
isInvalid?: boolean;
/**
* 値
*/
value: string | number;
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'invalid' | 'value'> &
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'invalid'> &
CustomDataAttributeProps;

export const Input = forwardRef<HTMLInputElement, Props>(({ isInvalid, ...props }, ref) => {
Expand Down
6 changes: 1 addition & 5 deletions src/components/TextArea/TextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@ type Props = {
* @default false
*/
isInvalid?: boolean;
/**
* 値
*/
value: string;
/**
* フィールドを無効化するかどうか
* @default false
*/
disabled?: boolean;
} & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value'> &
} & TextareaHTMLAttributes<HTMLTextAreaElement> &
CustomDataAttributeProps;

export const TextArea = forwardRef<HTMLTextAreaElement, Props>(({ isInvalid = false, className, ...props }, ref) => {
Expand Down

0 comments on commit d1eef29

Please sign in to comment.