Skip to content

Commit 4996deb

Browse files
committed
(PDS-555) Change props and close icon colour
1 parent 65ab0af commit 4996deb

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

packages/react-components/source/react/library/tag/Tag.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const propTypes = {
1111
onClick: func,
1212
/** Type dictates tag coloring */
1313
type: oneOf(['primary', 'neutral']),
14+
/** Currently only subtle netural supported */
15+
emphasis: oneOf(['bold', 'subtle']),
1416
/** Optional additional classnames */
1517
className: string,
1618
};
@@ -19,11 +21,19 @@ const defaultProps = {
1921
onClick: () => {},
2022
type: 'primary',
2123
className: '',
24+
emphasis: 'bold',
2225
};
2326

24-
const Tag = ({ label, onClick, type, className }) => {
27+
const Tag = ({ label, onClick, type, emphasis, className }) => {
2528
return (
26-
<div className={classNames('rc-tag', `rc-tag-${type}`, className)}>
29+
<div
30+
className={classNames(
31+
'rc-tag',
32+
`rc-tag-${type}`,
33+
`rc-tag-${emphasis}`,
34+
className,
35+
)}
36+
>
2737
<div className="rc-tag-label-background">
2838
<Text className="rc-tag-text">{label}</Text>
2939
</div>

packages/react-components/source/react/library/tag/Tag.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const onTagClick = () => {
2020

2121
### Neutral
2222

23-
The neutral tag can be selected through the type prop. This type of the tag has been developed to be used for displaying currently active filters within your application.
23+
The neutral tag can be selected through the type prop. This type of the tag has been developed to be used for displaying currently active filters within your application. Currently we only support a neutral subtle component. This also requires an emphasis="subtle" prop to be added.
2424

2525
```jsx
2626
const onTagClick = () => {
@@ -29,7 +29,12 @@ const onTagClick = () => {
2929

3030
<div>
3131
<div>
32-
<Tag label="Tag label" onClick={onTagClick} type="neutral" />
32+
<Tag
33+
label="Tag label"
34+
onClick={onTagClick}
35+
type="neutral"
36+
emphasis="subtle"
37+
/>
3338
</div>
3439
</div>;
3540
```

packages/react-components/source/scss/library/components/_tag.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323
}
2424

25-
.rc-tag-neutral {
25+
.rc-tag-neutral.rc-tag-subtle {
2626
background-color: $puppet-white;
2727
border: $puppet-common-border;
2828

@@ -37,7 +37,7 @@
3737
.rc-tag-remove-button {
3838
background: $puppet-white;
3939
border: $puppet-white;
40-
fill: $puppet-b500;
40+
fill: $puppet-n700;
4141

4242
&:hover {
4343
background-color: $puppet-n200;

0 commit comments

Comments
 (0)