Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
feat(FileInput): add accept property
Browse files Browse the repository at this point in the history
Added support for "accept" property of input[type=file]
  • Loading branch information
joaquinwojcik committed Feb 12, 2019
1 parent 0928f51 commit 0965e51
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/Form/FormFileInput.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type Props = {|
+label?: string,
+disabled?: boolean,
+readOnly?: boolean,
+accept?: string,
|};

type State = {| fileName: string |};
Expand Down Expand Up @@ -52,6 +53,7 @@ class FormFileInput extends React.Component<Props, State> {
onPointerLeave,
onFocus,
onBlur,
accept,
} = this.props;

const classes = cn("custom-file", className);
Expand All @@ -73,6 +75,7 @@ class FormFileInput extends React.Component<Props, State> {
onPointerLeave={onPointerLeave}
onFocus={onFocus}
onBlur={onBlur}
accept={accept}
/>
<label
className="custom-file-label"
Expand Down

0 comments on commit 0965e51

Please sign in to comment.