diff --git a/packages/semantic-ui/src/components/FileInputButton.js b/packages/semantic-ui/src/components/FileInputButton.js index defde50a..da0c074f 100644 --- a/packages/semantic-ui/src/components/FileInputButton.js +++ b/packages/semantic-ui/src/components/FileInputButton.js @@ -3,11 +3,20 @@ import React, { useRef } from 'react'; import { Button } from 'semantic-ui-react'; +/** + * multiple?: boolean, + * onSelection: (files: Array) => void + */ type Props = { multiple?: boolean, onSelection: (files: Array) => void }; +/** + * This component is used to allow a user to upload one or more files + * from their file system. This component also accepts + * all of the props of the Semantic UI Button component. + */ const FileInputButton = ({ onSelection, multiple, ...buttonProps }: Props) => { const fileInputRef = useRef(); diff --git a/packages/storybook/src/semantic-ui/FileInputButton.stories.js b/packages/storybook/src/semantic-ui/FileInputButton.stories.js index e949d791..d16c54f2 100644 --- a/packages/storybook/src/semantic-ui/FileInputButton.stories.js +++ b/packages/storybook/src/semantic-ui/FileInputButton.stories.js @@ -1,8 +1,8 @@ // @flow +import React, { useCallback } from 'react'; import { withKnobs } from '@storybook/addon-knobs'; -import React, { useCallback, useState } from 'react'; -import _ from 'underscore'; +import { Button } from 'semantic-ui-react'; import FileInputButton from '../../../semantic-ui/src/components/FileInputButton'; export default { @@ -12,7 +12,6 @@ export default { }; export const Default = () => { /** - * Allows the user to select files from their file system. * * @type {} */