Skip to content

Commit

Permalink
Use the correct icon size on large icon buttons
Browse files Browse the repository at this point in the history
They're designed to be 24px.
  • Loading branch information
robintown committed Aug 22, 2024
1 parent ab86e5b commit 4d69c9c
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ export const Button = forwardRef(function Button<
[styles.destructive]: destructive,
});

const iconSize = iconOnly && size === "lg" ? 24 : 20;

return (
<UnstyledButton
{...props}
Expand All @@ -111,8 +113,8 @@ export const Button = forwardRef(function Button<
>
{Icon && (
<Icon
width={20}
height={20}
width={iconSize}
height={iconSize}
className={styles.icon}
aria-hidden={true}
/>
Expand Down

0 comments on commit 4d69c9c

Please sign in to comment.