Skip to content

Commit

Permalink
Move comments to component, re-enable knobs
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiefolsom committed Sep 27, 2023
1 parent e03f515 commit 4be5c52
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 9 additions & 0 deletions packages/semantic-ui/src/components/FileInputButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,20 @@
import React, { useRef } from 'react';
import { Button } from 'semantic-ui-react';

/**
* multiple?: boolean,
* onSelection: (files: Array<File>) => void
*/
type Props = {
multiple?: boolean,
onSelection: (files: Array<File>) => 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 <code>Button</code> component.
*/
const FileInputButton = ({ onSelection, multiple, ...buttonProps }: Props) => {
const fileInputRef = useRef();

Expand Down
5 changes: 2 additions & 3 deletions packages/storybook/src/semantic-ui/FileInputButton.stories.js
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -12,7 +12,6 @@ export default {
};
export const Default = () => {
/**
* Allows the user to select files from their file system.
*
* @type {}
*/
Expand Down

0 comments on commit 4be5c52

Please sign in to comment.