Skip to content

Commit

Permalink
fix: pass classnames to icons in base button (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
ychhabra-eightfold authored Jun 1, 2022
1 parent e8c3a27 commit bcfb1a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/__snapshots__/storybook.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ exports[`Storyshots Button Default 1`] = `
<span>
<span
aria-hidden={true}
className="icon iconWrapper"
className="icon my-btn-icon iconWrapper"
data-test-id="myButtonIconTestId"
id="myButtonIcon"
role="presentation"
Expand Down Expand Up @@ -830,7 +830,7 @@ exports[`Storyshots Button Neutral 1`] = `
<span>
<span
aria-hidden={true}
className="icon iconWrapper"
className="icon my-btn-icon iconWrapper"
data-test-id="myButtonIconTestId"
id="myButtonIcon"
role="presentation"
Expand Down Expand Up @@ -879,7 +879,7 @@ exports[`Storyshots Button Primary 1`] = `
<span>
<span
aria-hidden={true}
className="icon iconWrapper"
className="icon my-btn-icon iconWrapper"
data-test-id="myButtonIconTestId"
id="myButtonIcon"
role="presentation"
Expand Down Expand Up @@ -928,7 +928,7 @@ exports[`Storyshots Button Secondary 1`] = `
<span>
<span
aria-hidden={true}
className="icon iconWrapper"
className="icon my-btn-icon iconWrapper"
data-test-id="myButtonIconTestId"
id="myButtonIcon"
role="presentation"
Expand Down Expand Up @@ -1040,7 +1040,7 @@ exports[`Storyshots Button Toggle 1`] = `
<span>
<span
aria-hidden={true}
className="icon iconWrapper"
className="icon my-btn-icon iconWrapper"
data-test-id="myButtonIconTestId"
id="myButtonIcon"
role="presentation"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/BaseButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export const BaseButton: FC<InternalButtonProps> = React.forwardRef(
const getButtonIcon = (): JSX.Element => (
<Icon
{...iconProps}
classNames={styles.icon}
classNames={mergeClasses([styles.icon, iconProps.classNames])}
size={getButtonIconSize()}
/>
);
Expand Down

0 comments on commit bcfb1a6

Please sign in to comment.