Skip to content

Commit 1b7d1a2

Browse files
committed
add story for Link
1 parent 1a86136 commit 1b7d1a2

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import React from "react";
2+
import { Meta, StoryFn } from "@storybook/react";
3+
4+
import { Link } from "../../../index";
5+
6+
export default {
7+
title: "Components/Link",
8+
component: Link,
9+
argTypes: {
10+
target: {
11+
control: "select",
12+
options: ["_self", "_blank", "_parent", "_top"],
13+
},
14+
},
15+
} as Meta<typeof Link>;
16+
17+
const Template: StoryFn<typeof Link> = (args) => <Link {...args} />;
18+
19+
export const Default = Template.bind({});
20+
Default.args = {
21+
children: "Example link",
22+
href: "https://example.com/",
23+
};
24+
25+
export const Disabled = Template.bind({});
26+
Disabled.args = {
27+
children: "Disabled link",
28+
href: "https://example.com/",
29+
disabled: true,
30+
};

0 commit comments

Comments
 (0)