Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(button): ensure icons with multiple paths render properly #6230

Merged
merged 6 commits into from
Jun 18, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/components/src/components/button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@
}
}

.#{$prefix}--btn path[data-icon-path='inner-path'] {
fill: none;
}

.#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--btn--ghost
.#{$prefix}--btn__icon,
.#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--btn--ghost:hover
Expand Down
4 changes: 3 additions & 1 deletion packages/react/src/components/Button/Button-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { action } from '@storybook/addon-actions';
import { withKnobs, boolean, select, text } from '@storybook/addon-knobs';
import { settings } from 'carbon-components';
import { iconAddSolid, iconSearch } from 'carbon-icons';
import { Add16, Search16 } from '@carbon/icons-react';
import { Add16, AddFilled16, Search16 } from '@carbon/icons-react';
import Button from '../Button';
import ButtonSkeleton from '../Button/Button.Skeleton';

Expand All @@ -20,13 +20,15 @@ const { prefix } = settings;
const icons = {
None: 'None',
'Add (Add16 from `@carbon/icons-react`)': 'Add16',
'Add (Filled) (AddFilled16 from `@carbon/icons-react`)': 'AddFilled16',
'Search (Search16 from `@carbon/icons-react`)': 'Search16',
};

const iconMap = {
iconAddSolid,
iconSearch,
Add16,
AddFilled16,
Search16,
};

Expand Down