Skip to content

Commit

Permalink
fix(tag): define default tag style (#5677)
Browse files Browse the repository at this point in the history
This change defines the default tag style (color) as specified in #5506.

Fixes #5506.
  • Loading branch information
asudoh authored Mar 23, 2020
1 parent fd12e21 commit ffba29a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions packages/components/src/components/tag/_tag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
.#{$prefix}--tag {
@include button-reset($width: false);
@include type-style('label-01');
@include tag-theme($ibm-color__gray-20, $ibm-color__gray-100);

display: inline-flex;
align-items: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4786,7 +4786,6 @@ Map {
"warm-gray",
],
],
"isRequired": true,
"type": "oneOf",
},
},
Expand Down
7 changes: 4 additions & 3 deletions packages/react/src/components/Tag/Tag-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ const props = {
...acc,
[`${type} (${type})`]: type,
}),
{}
),
'red'
{
Default: undefined,
}
)
),
disabled: boolean('Disabled (disabled)', false),
title: 'Clear Filter',
Expand Down
6 changes: 3 additions & 3 deletions packages/react/src/components/Tag/Tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ const Tag = ({
...other
}) => {
const tagId = id || `tag-${getInstanceId()}`;
const tagClass = `${prefix}--tag--${type}`;
const tagClasses = classNames(`${prefix}--tag`, tagClass, className, {
const tagClasses = classNames(`${prefix}--tag`, className, {
[`${prefix}--tag--disabled`]: disabled,
[`${prefix}--tag--filter`]: filter,
[`${prefix}--tag--${type}`]: type,
});
const handleClose = event => {
event.stopPropagation();
Expand Down Expand Up @@ -90,7 +90,7 @@ Tag.propTypes = {
/**
* Specify the type of the <Tag>
*/
type: PropTypes.oneOf(Object.keys(TYPES)).isRequired,
type: PropTypes.oneOf(Object.keys(TYPES)),

/**
* Specify if the <Tag> is disabled
Expand Down

0 comments on commit ffba29a

Please sign in to comment.