Skip to content

Commit

Permalink
fix(Input): add default value prop
Browse files Browse the repository at this point in the history
  • Loading branch information
bramvanhoutte committed Nov 2, 2020
1 parent 2798eac commit 3d7a250
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import styles from './Input.module.css';
interface Props {
name: string;
value?: string;
defaultValue?: string;
onChange?: ChangeEventHandler<HTMLInputElement>;
onBlur?: FocusEventHandler<HTMLInputElement>;
placeholder?: string;
Expand All @@ -24,6 +25,7 @@ const Input = React.forwardRef<HTMLInputElement, Props>(
{
name,
value,
defaultValue,
onChange,
onBlur,
placeholder,
Expand All @@ -50,6 +52,7 @@ const Input = React.forwardRef<HTMLInputElement, Props>(
<input
name={name}
value={value}
defaultValue={defaultValue}
onChange={onChange}
placeholder={placeholder}
type={type}
Expand Down

0 comments on commit 3d7a250

Please sign in to comment.