feat: add Tabs compound component#284
Conversation
commit: |
| </svg> | ||
| ); | ||
|
|
||
| const FolderKanbanIcon = () => ( |
There was a problem hiding this comment.
Super minor, but you can probably just pull the example icons from lucide instead for a more "realistic" example
There was a problem hiding this comment.
Ah, right. Let me quickly updated that before merging this PR. It won't need the extra review again.
There was a problem hiding this comment.
Found the other examples are using SVG icons too, so will work in a different PR to eradicate those things with lucide-react all at once.
| "astw:text-muted-foreground", | ||
| "astw:focus-visible:outline-ring/70 astw:focus-visible:ring-ring/50 astw:focus-visible:outline-1 astw:focus-visible:ring-[3px]", | ||
| "astw:data-disabled:pointer-events-none astw:data-disabled:opacity-50", | ||
| variant === "line" |
There was a problem hiding this comment.
Same nested ternary issue 😅, would be great to split this off into it's own function but not that big of a deal.
I can see that the BaseTabs.List component has the same nested class names, you can probably just make a function that accepts an argument of variant and componentType and then return the right class names but it's not that important.
There was a problem hiding this comment.
Created a seperated ticket to eradicate the nested ternaries 👍
Add
Tabscompound component for tab-based navigation, backed by Base UI's Tabs primitive.Screen shots
Usage