import { ComponentMeta, ComponentStory } from '@storybook/react';
import LinkComponent from './link';

export default {
  title: 'Atoms/Links',
  component: LinkComponent,
  argTypes: {
    children: {
      control: {
        type: 'text',
      },
      description: 'The link body.',
      type: {
        name: 'string',
        required: true,
      },
    },
    external: {
      control: {
        type: 'boolean',
      },
      table: {
        category: 'Options',
      },
      description: 'Determine if the link is external of the current website.',
      type: {
        name: 'boolean',
        required: false,
      },
    },
    href: {
      control: {
        type: 'text',
      },
      description: 'The link target.',
      type: {
        name: 'string',
        required: true,
      },
    },
    lang: {
      control: {
        type: 'text',
      },
      table: {
        category: 'Options',
      },
      description: 'The target language as code language.',
      type: {
        name: 'string',
        required: false,
      },
    },
  },
} as ComponentMeta<typeof LinkComponent>;

const Template: ComponentStory<typeof LinkComponent> = (args) => (
  <LinkComponent {...args} />
);

export const Link = Template.bind({});
Link.args = {
  children: 'A link',
  href: '#',
  external: false,
};
ref='/www.armandphilippot.com/'>summary</a><a href='/www.armandphilippot.com/refs/?id=c9c1c90b30e243563bb4f731da15b3fe657556d2'>refs</a><a href='/www.armandphilippot.com/log/public/prism/prism-cilkc.js'>log</a><a class='active' href='/www.armandphilippot.com/tree/public/prism/prism-cilkc.js?id=c9c1c90b30e243563bb4f731da15b3fe657556d2'>tree</a><a href='/www.armandphilippot.com/commit/public/prism/prism-cilkc.js?id=c9c1c90b30e243563bb4f731da15b3fe657556d2'>commit</a><a href='/www.armandphilippot.com/diff/public/prism/prism-cilkc.js?id=c9c1c90b30e243563bb4f731da15b3fe657556d2'>diff</a><a href='/www.armandphilippot.com/stats/public/prism/prism-cilkc.js'>stats</a></td><td class='form'><form class='right' method='get' action='/www.armandphilippot.com/log/public/prism/prism-cilkc.js'>
<input type='hidden' name='id' value='c9c1c90b30e243563bb4f731da15b3fe657556d2'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/www.armandphilippot.com/tree/?id=c9c1c90b30e243563bb4f731da15b3fe657556d2'>root</a>/<a href='/www.armandphilippot.com/tree/public?id=c9c1c90b30e243563bb4f731da15b3fe657556d2'>public</a>/<a href='/www.armandphilippot.com/tree/public/prism?id=c9c1c90b30e243563bb4f731da15b3fe657556d2'>prism</a>/<a href='/www.armandphilippot.com/tree/public/prism/prism-cilkc.js?id=c9c1c90b30e243563bb4f731da15b3fe657556d2'>prism-cilkc.js</a></div><div class='content'>blob: 3f8acb0b0306428fefaa684084873626f8bfc930 (<a href='/www.armandphilippot.com/plain/public/prism/prism-cilkc.js?id=c9c1c90b30e243563bb4f731da15b3fe657556d2'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
<a id='n2' href='#n2'>2</a>
<a id='n3' href='#n3'>3</a>
<a id='n4' href='#n4'>4</a>
<a id='n5' href='#n5'>5</a>
<a id='n6' href='#n6'>6</a>
<a id='n7' href='#n7'>7</a>
<a id='n8' href='#n8'>8</a>
</pre></td>
<td class='lines'><pre><code>