Skip to content

Commit a9d5d68

Browse files
committed
feature: add test cast definitions
1 parent 88f70fc commit a9d5d68

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import type { Meta, StoryObj } from "@storybook/react";
2+
import { Link } from "./Link";
3+
4+
export default {
5+
component: Link,
6+
parameters: {
7+
layout: "centered",
8+
},
9+
args: {
10+
children: "๋งํฌ",
11+
},
12+
} satisfies Meta<typeof Link>;
13+
14+
export const Basic: StoryObj<typeof Link> = {};

โ€Žsrc/components/Link/Link.tsxโ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ interface LinkWithoutChildren extends AnchorHTMLAttributes<HTMLAnchorElement> {
1515
underline?: boolean;
1616
}
1717

18-
export type LinkProps = PropsWithChildren<LinkWithoutChildren>;
18+
export const Link = ({ children }: PropsWithChildren<LinkWithoutChildren>) => {
19+
return <>{children}</>;
20+
};

0 commit comments

Comments
ย (0)