Skip to content

Commit

Permalink
fix: restore CvTag default color from Vue2 (#1589)
Browse files Browse the repository at this point in the history
  • Loading branch information
OlkaB committed Apr 18, 2024
1 parent 309c183 commit 1d7a2df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/components/CvTag/CvTag.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const Template = (args, { argTypes }) => {

export const Default = Template.bind({});
Default.args = {
kind: 'red',
label: 'This is a tag',
filter: false,
};
Expand All @@ -43,7 +42,6 @@ Default.parameters = storyParametersObject(

export const Filter = Template.bind({});
Filter.args = {
kind: 'teal',
label: 'This is a tag',
filter: true,
};
Expand Down
6 changes: 4 additions & 2 deletions src/components/CvTag/CvTag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default {
*/
kind: {
type: String,
default: 'red',
default: undefined,
validator(val) {
return tagKinds.includes(val);
},
Expand Down Expand Up @@ -80,7 +80,9 @@ export default {
if (props.skeleton) {
classes.push(`${carbonPrefix}--skeleton`);
} else {
classes.push(`${carbonPrefix}--tag--${props.kind}`);
if (props.kind) {
classes.push(`${carbonPrefix}--tag--${props.kind}`);
}
if (props.filter) {
classes.push(`${carbonPrefix}--tag--filter`);
Expand Down

0 comments on commit 1d7a2df

Please sign in to comment.