Skip to content

Commit

Permalink
[sparkle] - enh: Tabs (#8564)
Browse files Browse the repository at this point in the history
* [sparkle] - feature: allow different button variants in TabsTrigger component

 - Add a `buttonVariant` prop to TabsTrigger to support different button styles
 - Set default `buttonVariant` to "ghost" to maintain backward compatibility

* [sparkle] - feature: bump package version to 0.2.303

 - Updated the package version for new release
  • Loading branch information
JulesBelveze authored Nov 8, 2024
1 parent 527625f commit f89aba6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sparkle/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sparkle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dust-tt/sparkle",
"version": "0.2.302",
"version": "0.2.303",
"scripts": {
"build": "rm -rf dist && npm run tailwind && npm run build:esm && npm run build:cjs",
"tailwind": "tailwindcss -i ./src/styles/tailwind.css -o dist/sparkle.css",
Expand Down
4 changes: 3 additions & 1 deletion sparkle/src/components/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const TabsTrigger = React.forwardRef<
tooltip?: string;
icon?: React.ComponentType;
isLoading?: boolean;
buttonVariant?: React.ComponentProps<typeof Button>["variant"]
} & Omit<LinkWrapperProps, "children" | "className">
>(
(
Expand All @@ -54,6 +55,7 @@ const TabsTrigger = React.forwardRef<
replace,
shallow,
disabled,
buttonVariant = "ghost",
...props
},
ref
Expand All @@ -72,7 +74,7 @@ const TabsTrigger = React.forwardRef<
>
<div>
<Button
variant="ghost"
variant={buttonVariant}
size="sm"
label={label}
tooltip={tooltip}
Expand Down

0 comments on commit f89aba6

Please sign in to comment.