Skip to content

Commit

Permalink
refactoring code for buttonIcon variable to keep more concise definition
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel Valdes Gutierrez <[email protected]>
  • Loading branch information
BigSamu committed Jan 2, 2024
1 parent 787119a commit 0d259a3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/button/button_content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,12 @@ export const OuiButtonContent: FunctionComponent<
<OuiLoadingSpinner className="ouiButtonContent__spinner" size="m" />
);
} else if (iconType) {
const { title } = { ...textProps };
buttonIcon = (
<OuiIcon
className="ouiButtonContent__icon"
type={iconType}
size={iconSize}
title={title}
title={textProps?.title}
color="inherit" // forces the icon to inherit its parent color
/>
);
Expand Down

0 comments on commit 0d259a3

Please sign in to comment.