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

Commit 0965e51

Browse files
committed
feat(FileInput): add accept property
Added support for "accept" property of input[type=file]
1 parent 0928f51 commit 0965e51

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/components/Form/FormFileInput.react.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ type Props = {|
2121
+label?: string,
2222
+disabled?: boolean,
2323
+readOnly?: boolean,
24+
+accept?: string,
2425
|};
2526

2627
type State = {| fileName: string |};
@@ -52,6 +53,7 @@ class FormFileInput extends React.Component<Props, State> {
5253
onPointerLeave,
5354
onFocus,
5455
onBlur,
56+
accept,
5557
} = this.props;
5658

5759
const classes = cn("custom-file", className);
@@ -73,6 +75,7 @@ class FormFileInput extends React.Component<Props, State> {
7375
onPointerLeave={onPointerLeave}
7476
onFocus={onFocus}
7577
onBlur={onBlur}
78+
accept={accept}
7679
/>
7780
<label
7881
className="custom-file-label"

0 commit comments

Comments
 (0)