import { Story, Preview, Props } from '@storybook/addon-docs/blocks';
import { FileUpload } from './FileUpload';

# FileUpload

A button-styled input that triggers file upload popup. Button text and accepted file extensions can be customized via `label` and `accepted` props respectively.

### Usage

```jsx
import { FileUpload } from '@grafana/ui';

<FileUpload
  onFileUpload={({ currentTarget }) => console.log('file', currentTarget?.files && currentTarget.files[0])}
/>;
```

### Props

<Props of={FileUpload} />
