Skip to content

Commit

Permalink
Increase button icon size to match text
Browse files Browse the repository at this point in the history
  • Loading branch information
psirenny authored Aug 23, 2024
1 parent ee93344 commit 43df9d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/tall-pumas-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@spear-ai/ui": patch
---

Increased button icon size to match text.
5 changes: 1 addition & 4 deletions packages/ui/src/components/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@ export const ButtonIcon = forwardRef<
SVGAttributes<SVGElement> & { asChild?: boolean | undefined }
>(({ asChild = false, className, ...properties }, reference) => {
const Component = asChild ? Slot : "svg";
const mergedClassName = cx(
"size-3 group-data-[size='small']:size-2.5 group-data-[size='x-small']:size-2.5",
className,
);
const mergedClassName = cx("size-4 group-data-[size='x-small']:size-3.5", className);
// @ts-expect-error the Slot component’s type definition doesn’t play nice with SVGs
return <Component aria-hidden className={mergedClassName} ref={reference} {...properties} />;
});
Expand Down

0 comments on commit 43df9d1

Please sign in to comment.