Skip to content

Commit

Permalink
feat(TMC-28838/tags): add beta styled tag to the Tag component (#5357)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybaskaran authored Jun 25, 2024
1 parent f795e70 commit ca1734c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/chilled-files-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@talend/react-components': minor
---

feat(TMC-28838/tags): add beta styled tag to the Tag component
9 changes: 9 additions & 0 deletions packages/components/src/TabBar/Tabs.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ const tabProps = {
'data-feature': 'action.9',
disabled: true,
},
{
key: '10',
label: 'Tab10',
badge: {
label: 'BETA',
bsStyle: 'beta',
},
'data-feature': 'action.10',
},
],
onSelect: action('onSelect'),
selectedKey: '2',
Expand Down
7 changes: 6 additions & 1 deletion packages/components/src/Tag/Tag.component.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import PropTypes from 'prop-types';

import {
Tag as CoralTag,
TagBeta as CoralTagBeta,
TagDestructive as CoralTagDestructive,
TagInformation as CoralTagInformation,
TagSuccess as CoralTagSuccess,
TagWarning as CoralTagWarning,
TagDestructive as CoralTagDestructive,
} from '@talend/design-system';

/**
Expand All @@ -25,6 +27,9 @@ const Tag = ({ bsStyle, ...rest }) => {
case 'danger':
StyledTag = CoralTagDestructive;
break;
case 'beta':
StyledTag = CoralTagBeta;
break;
default:
break;
}
Expand Down

0 comments on commit ca1734c

Please sign in to comment.