From 1d7a2df06828bc3d3dee87f53f4a685b1345e95e Mon Sep 17 00:00:00 2001 From: OlkaB Date: Thu, 18 Apr 2024 22:30:40 +0100 Subject: [PATCH] fix: restore CvTag default color from Vue2 (#1589) --- src/components/CvTag/CvTag.stories.js | 2 -- src/components/CvTag/CvTag.vue | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/CvTag/CvTag.stories.js b/src/components/CvTag/CvTag.stories.js index ed56e1bd6..d41b83a1a 100644 --- a/src/components/CvTag/CvTag.stories.js +++ b/src/components/CvTag/CvTag.stories.js @@ -31,7 +31,6 @@ const Template = (args, { argTypes }) => { export const Default = Template.bind({}); Default.args = { - kind: 'red', label: 'This is a tag', filter: false, }; @@ -43,7 +42,6 @@ Default.parameters = storyParametersObject( export const Filter = Template.bind({}); Filter.args = { - kind: 'teal', label: 'This is a tag', filter: true, }; diff --git a/src/components/CvTag/CvTag.vue b/src/components/CvTag/CvTag.vue index 479537497..f7afc0780 100644 --- a/src/components/CvTag/CvTag.vue +++ b/src/components/CvTag/CvTag.vue @@ -40,7 +40,7 @@ export default { */ kind: { type: String, - default: 'red', + default: undefined, validator(val) { return tagKinds.includes(val); }, @@ -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`);