mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
19 lines
430 B
TypeScript
19 lines
430 B
TypeScript
import * as RadixTabs from "@radix-ui/react-tabs";
|
|
|
|
import type { SidebarTabName } from "../../types";
|
|
|
|
export const SidebarTab = ({
|
|
tab,
|
|
children,
|
|
...rest
|
|
}: {
|
|
tab: SidebarTabName;
|
|
children: React.ReactNode;
|
|
} & React.HTMLAttributes<HTMLDivElement>) => {
|
|
return (
|
|
<RadixTabs.Content {...rest} value={tab} data-testid={tab}>
|
|
{children}
|
|
</RadixTabs.Content>
|
|
);
|
|
};
|
|
SidebarTab.displayName = "SidebarTab";
|