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

feat(TMC-28838/tags): add beta styled tag to the Tag component #5357

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
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
Loading