import React from 'react'
import { Story, Meta } from '@storybook/react'
import { Link, LinkProps } from './Link'

export default {
  title: 'Navigation/Link',
  component: Link,
  argTypes: {
    url: {
      name: 'url',
      description: 'The url to link to ',
      type: { name: 'string', required: false }
    }
  }
} as Meta

const Template: Story<LinkProps> = (args: any) => {
  return <Link {...args}>Text sample</Link>
}

export const Default = Template.bind({
  url: 'https://www.palenca.com/'
})

export const External = Template.bind({
  url: 'https://www.palenca.com/',
  exteral: true
})

export const onClick = Template.bind({
  onClick: () => alert('Clicked')
})
