Skip to content
This repository was archived by the owner on Mar 24, 2023. It is now read-only.

Commit dc0424e

Browse files
authored
Merge pull request #126 from Groww/sync/tag
[Tag] syncing with Desktop
2 parents 9a53819 + 4437f59 commit dc0424e

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

src/components/atoms/Tag/Tag.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import './tag.css';
44

55

66
const Tag = (props: Props) => {
7-
if (!React.Children.count(props.children)) {
7+
const childrenCount = React.Children.count(props.children);
8+
9+
if (!childrenCount) {
810
return null;
911
}
1012

@@ -20,8 +22,15 @@ const Tag = (props: Props) => {
2022
tagClass = 'tg11Info';
2123
}
2224

25+
if (childrenCount === 1) {
26+
tagClass += ' absolute-center';
27+
28+
} else {
29+
tagClass += ' valign-wrapper vspace-between';
30+
}
31+
2332
return (
24-
<div className={`tg11Container ${tagClass}`}>
33+
<div className={`fs12 width100 tg11Container ${tagClass}`}>
2534
{props.children}
2635
</div>
2736
);

src/components/atoms/Tag/tag.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.tg11Container {
2-
align-items: center;
2+
align-items: center;
33
display: inline-flex;
44
justify-content: center;
5-
font-size: 12px;
6-
letter-spacing: 0.2px;
7-
border-radius: 15px;
85
padding: 3px 10px;
96
overflow: hidden;
7+
border-radius: 4px;
8+
min-height: 30px;
9+
-webkit-font-smoothing: auto;
1010
}
1111

1212
.tg11Warning {
@@ -16,5 +16,5 @@
1616

1717
.tg11Error {
1818
background-color: var(--growwRed10);
19-
color: var(--growwRed);
20-
}
19+
color: var(--text);
20+
}

0 commit comments

Comments
 (0)