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

# Link

Links are for navigating between pages in the site. They're expected to be inline to text.

<Preview>
  <Story id="content-link--default" />
</Preview>

## External

External links are links that go to other websites. These include an icon to show that the user is leaving the site. By default external sites will open in a new tab.
If the `external` prop is not supplied, `Link` will check if its external by looking comparing the host of the `to` prop to the current host.

Note: Do not use external if you only want the page to open in a new tab. You can achieve the same behavior by setting `target="_blank"` and `rel="noreferrer noopener"`.

<Preview>
  <Story id="content-link--implicit-external" />
</Preview>

## Props

<ArgsTable of={Link} />
