Skip to content

Commit

Permalink
refactor(components): update Link stories (#14825)
Browse files Browse the repository at this point in the history
* refactor(components): update Link stories
  • Loading branch information
koji authored Apr 8, 2024
1 parent 80a834e commit 6bb0f30
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions components/src/primitives/Link.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
import * as React from 'react'
import { Link } from './Link'

import type { Story, Meta } from '@storybook/react'
import type { Meta, StoryObj } from '@storybook/react'

export default {
const meta: Meta<typeof Link> = {
title: 'Library/Atoms/Link',
} as Meta
component: Link,
}

export default meta

type Story = StoryObj<typeof Link>

const Template: Story<React.ComponentProps<typeof Link>> = args => (
<Link {...args} />
)
export const Basic = Template.bind({})
Basic.args = {
children: 'hello anchor',
href: '#',
export const Basic: Story = {
args: {
children: 'hello anchor',
href: '#',
},
}

export const External = Template.bind({})
External.args = {
children: 'hello opentrons',
external: true,
href: 'https://www.opentrons.com',
export const External: Story = {
args: {
children: 'hello opentrons',
external: true,
href: 'https://www.opentrons.com',
},
}

0 comments on commit 6bb0f30

Please sign in to comment.