mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
fix(site): fix tabs (#10838)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { Tabs, TabLink } from "./Tabs";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof Tabs> = {
|
||||
title: "components/Tabs",
|
||||
component: Tabs,
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof Tabs>;
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
children: (
|
||||
<>
|
||||
<TabLink to="">Tab 1</TabLink>
|
||||
<TabLink to="tab-3">Tab 2</TabLink>
|
||||
<TabLink to="tab-4">Tab 3</TabLink>
|
||||
</>
|
||||
),
|
||||
},
|
||||
};
|
||||
@@ -29,11 +29,7 @@ interface TabLinkProps extends NavLinkProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export const TabLink: FC<TabLinkProps> = ({
|
||||
className,
|
||||
children,
|
||||
...linkProps
|
||||
}) => {
|
||||
export const TabLink: FC<TabLinkProps> = ({ className, ...linkProps }) => {
|
||||
const tabLink = useClassName(classNames.tabLink, []);
|
||||
const activeTabLink = useClassName(classNames.activeTabLink, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user