import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
import * as stories from './button.stories.js';

import ElButton from 'element-ui'

<Meta title="Components/Button" component={ElButton} />

# Button

## About Buttons
Buttons are a vital element in creating a positive and productive user experience. At their most basic, UX buttons are styled links that grab the user’s attention and help drive them in a particular direction. Buttons can link us to other pages or complete an action like “Browse Datasets.” They are often used as calls to actions (CTA) we want our users to complete on our website.

### Primary Button
This button is used for a primary call to action

<Story name='Primary' height='60px'>{stories.Primary()}</Story>

#### Code

```html
<el-button>Submit</el-button>
<el-button disabled>Disabled Button</el-button>
<el-button class="large">Large Button</el-button>
<el-button>Medium Button</el-button>
<el-button class="small">Small Button</el-button>
```

---

### Secondary Button
This button is used for a non-primary call to action that still needs attention
<Story name='Secondary' height='50px'>{stories.Secondary()}</Story>

#### Code

```html
<el-button class="secondary">Submit</el-button>
<el-button class="secondary" disabled>Disabled Button</el-button>
```

---

### Danger
<Story name='Danger' height='50px'>{stories.Danger()}</Story>

#### Code

```html
<el-button class="danger">Submit</el-button>
<el-button class="danger" disabled>Disabled Button</el-button>
```

### Sizes

#### Large

Primary call to action, the most important task on the page. Use in the homepage and heros.

<Story name='Large Button' height='60px'>{stories.ButtonSizes('large', 'Large Button')}</Story>

```html
<el-button class="large">Large Button</el-button>
```


#### Medium

Default button, used for non-CTA purposes.

<Story name='Medium Button' height='60px'>{stories.ButtonSizes('', 'Medium Button')}</Story>

```html
<el-button>Medium Button</el-button>
```


#### Small

Small buttons are used for supplemental user actions such as filter and modal actions.

<Story name='Small Button' height='60px'>{stories.ButtonSizes('small', 'Small Button')}</Story>

```html
<el-button class="small">Small Button</el-button>
```


#### Extra Small

Extra Small buttons are used for supplemental user actions such as overlaying other components.

<Story name='Extra Small Button' height='60px'>{stories.ButtonSizes('extra-small', 'Extra Small Button')}</Story>

```html
<el-button class="extra-small">Extra Small Button</el-button>
```

#### Icon Buttons

<Story name='Icons' height='60px'>{stories.Icons()}</Story>

```html
<el-button circle>
  <svgicon
    name="2horpanel"
    color="transparent #fff"
  />
</el-button>
```
