import { Meta, Story, Props, Preview } from '@storybook/addon-docs/blocks';
import { Button } from './button.component';
import { FlowPropsTable, ExternalReferenceLink } from '../../../utils';

<Meta title="Buttons/Primary" component={Button} />

# Button

The button component renders a primary- or secondary- branded button in a range of sizes.

The button either renders a button element or a link element based on if an onClick or url respectively was provided to the button.

## Sizes

<Preview withToolbar>
  <Story id="buttons-primary--sm" />
  <Story id="buttons-primary--md" />
</Preview>

## States

<Preview withToolbar>
  <Story id="buttons-primary--disabled" />
</Preview>

## As Link

<Preview withToolbar>
  <Story id="buttons-primary--as-link" />
</Preview>

## Props

<FlowPropsTable ofComponent={Button} />

## External Reference

<ExternalReferenceLink
  src="https://www.figma.com/file/r5zKXblbSt0b869OEcOWXu/Patchwork-Web?node-id=637%3A9"
  type="figma"
/>
<ExternalReferenceLink
  src="https://github.com/wealthsimple/patchwork/tree/master/src/core/actions/button"
  type="github"
/>
