This repository was archived by the owner on Mar 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ import './tag.css';
44
55
66const 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 ) ;
Original file line number Diff line number Diff line change 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 {
1616
1717.tg11Error {
1818 background-color : var (--growwRed10 );
19- color : var (--growwRed );
20- }
19+ color : var (--text );
20+ }
You can’t perform that action at this time.
0 commit comments