feature/tauri-js-rs
tsx 31 lines 553 Bytes
Raw
1 import { Tab } from "./tab";
2
3 export type Item = {
4 text: string;
5 slug?: string;
6 segment?: string;
7 parallelRoutesKey?: string;
8 };
9
10 export const TabGroup = ({
11 path,
12 parallelRoutesKey,
13 items,
14 }: {
15 path: string;
16 parallelRoutesKey?: string;
17 items: Item[];
18 }) => {
19 return (
20 <div className="flex flex-wrap items-center gap-2">
21 {items.map((item) => (
22 <Tab
23 key={path + item.slug}
24 item={item}
25 path={path}
26 parallelRoutesKey={parallelRoutesKey}
27 />
28 ))}
29 </div>
30 );
31 };