Skip to content

Commit

Permalink
fix: add missing label to IconButton container
Browse files Browse the repository at this point in the history
  • Loading branch information
dornelasnelson committed Jan 31, 2025
1 parent 64e83c2 commit a87f031
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 2 deletions.
101 changes: 101 additions & 0 deletions package-lock.json

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

9 changes: 7 additions & 2 deletions src/components/experimental/IconButton/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface IconButtonProps extends ButtonProps {
label: string;
}

const StandardIconContainer = styled(Button)<Omit<IconButtonProps, 'Icon' >>`
const StandardIconContainer = styled(Button)<Omit<IconButtonProps, 'Icon'>>`
height: 2.5rem;
width: 2.5rem;
border-radius: 100%;
Expand Down Expand Up @@ -123,11 +123,16 @@ export const IconButton = ({
isDisabled={isDisabled}
isActive={isActive}
isPending={isLoading}
label={label}
{...restProps}
>
<>
{isLoading ? (
<InlineSpinner data-testid="iconbutton-spinner" color={getSemanticValue('on-surface')} size="medium" />
<InlineSpinner
data-testid="iconbutton-spinner"
color={getSemanticValue('on-surface')}
size="medium"
/>
) : (
<Icon data-testid="iconbutton-icon" />
)}
Expand Down

0 comments on commit a87f031

Please sign in to comment.