Skip to content

Commit ddf5569

Browse files
fix(site): fix tabs (#10838)
1 parent a20ec66 commit ddf5569

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { Tabs, TabLink } from "./Tabs";
2+
import type { Meta, StoryObj } from "@storybook/react";
3+
4+
const meta: Meta<typeof Tabs> = {
5+
title: "components/Tabs",
6+
component: Tabs,
7+
};
8+
9+
export default meta;
10+
type Story = StoryObj<typeof Tabs>;
11+
12+
export const Default: Story = {
13+
args: {
14+
children: (
15+
<>
16+
<TabLink to="">Tab 1</TabLink>
17+
<TabLink to="tab-3">Tab 2</TabLink>
18+
<TabLink to="tab-4">Tab 3</TabLink>
19+
</>
20+
),
21+
},
22+
};

site/src/components/Tabs/Tabs.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ interface TabLinkProps extends NavLinkProps {
2929
className?: string;
3030
}
3131

32-
export const TabLink: FC<TabLinkProps> = ({
33-
className,
34-
children,
35-
...linkProps
36-
}) => {
32+
export const TabLink: FC<TabLinkProps> = ({ className, ...linkProps }) => {
3733
const tabLink = useClassName(classNames.tabLink, []);
3834
const activeTabLink = useClassName(classNames.activeTabLink, []);
3935

0 commit comments

Comments
 (0)