import { Meta, Story, ArgsTable, Canvas } from '@storybook/addon-docs/blocks';
import { TertiaryButton } from './tertiary-button.component';
import { FlowPropsTable, ExternalReferenceLink } from '../../../utils';
import { Box } from '../../..';

<Meta title="Components/Actions/Tertiary Button" component={TertiaryButton} />

# Tertiary Button

- [Actions Accessibility
  Tips](/?path=/story/components-actions-accessibility-tips--page)

The TertiaryButton component is used for smaller one-off buttons that are not part of a page's main primary/secondary CTA flow.

The `TertiaryButton` component either renders a button element or a link element based on whether a `href` prop is passed in.

<Canvas>
  <Box stacked="row" justify="space-around">
    <Story id="components-actions-tertiary-button--as-link" />
    <Story id="components-actions-tertiary-button--as-button" />
    <Story id="components-actions-tertiary-button--as-button-loading" />
    <Story id="components-actions-tertiary-button--as-button-disabled" />
  </Box>
</Canvas>

## Supported Property Mixins:

Spacing:

<Canvas>
  <Story id="components-actions-tertiary-button--mixins-spacing" />
</Canvas>

Stackee:

<Canvas>
  <Story id="components-actions-tertiary-button--mixins-stackee" />
</Canvas>

## Props

<FlowPropsTable ofComponent={TertiaryButton} />

## 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/tertiary-button"
  type="github"
/>
