Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react/src/components/F0Button/internal-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export type ButtonInternalProps = Pick<
*/
variant?: ActionButtonVariant
/**
* The filters'counter value to display.
* A count shown in a neutral counter to the right of the label.
*/
counterValue?: number
/**
Expand Down
12 changes: 11 additions & 1 deletion packages/react/src/components/F0Button/internal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,17 @@ const ButtonInternal = forwardRef<
{iconPosition === "right" && iconNode}
{append}{" "}
{counterValue && (
<Counter value={counterValue} size="sm" type="selected" />
<span
className={cn(
"ml-1 inline-flex items-center",
// The default (primary) button is a solid dark-red field, so the
// light counter would wash out. Forcing the dark theme onto just
// the counter gives it a dark pill regardless of the app theme.
variant === "default" && "dark"
)}
>
<Counter value={counterValue} size="sm" type="default" />
</span>
)}
</div>
</Action>
Expand Down
Loading