@@ -12,10 +12,10 @@ import Data.String (Pattern(..), drop, indexOf, joinWith, null, split)
1212import Effect (Effect )
1313import Global.Unsafe (unsafeEncodeURIComponent )
1414import JSS (JSS , jss )
15+ import Lumi.Components.Badge (badge )
1516import Lumi.Components.Color (colors )
1617import Lumi.Components.Column (column_ )
1718import Lumi.Components.Link as Link
18- import Lumi.Components.Text (lumiSubtextFontSize )
1919import React.Basic (Component , JSX , createComponent , element , empty , fragment , makeStateless )
2020import React.Basic.DOM (CSS , mergeStyles )
2121import React.Basic.DOM as R
@@ -38,7 +38,6 @@ tab :: TabProps -> JSX
3838tab = makeStateless tabComponent render
3939 where
4040 lumiTabElement = element (R .unsafeCreateDOMComponent " lumi-tab" )
41- lumiTabCountElement = element (R .unsafeCreateDOMComponent " lumi-tab-count" )
4241
4342 render props =
4443 lumiTabElement
@@ -51,9 +50,11 @@ tab = makeStateless tabComponent render
5150 fragment
5251 [ props.label
5352 , props.count # maybe mempty \count ->
54- lumiTabCountElement
53+ badge
5554 { style: R .css { marginLeft: " 8px" }
56- , children: [ R .text (show count) ]
55+ , background: colors.black5
56+ , color: colors.secondary
57+ , text: show count
5758 }
5859 ]
5960 }
@@ -213,11 +214,12 @@ styles = jss
213214 { " lumi-tab" :
214215 { flex: " 0 0 auto"
215216 , display: " flex"
217+ , alignItems: " center"
216218 , boxSizing: " border-box"
217219 , " & > a.lumi" :
218220 { flex: " 0 0 auto"
219221 , display: " flex"
220- , alignItems: " center "
222+ , alignItems: " baseline "
221223 , fontSize: " 14px "
222224 , cursor: " pointer"
223225 , whiteSpace: " nowrap"
@@ -229,18 +231,6 @@ styles = jss
229231 }
230232 }
231233
232- , " & lumi-tab-count" :
233- { fontSize: lumiSubtextFontSize
234- , color: cssStringHSLA colors.secondary
235-
236- , borderRadius: " 9px"
237- , backgroundColor: cssStringHSLA colors.black5
238-
239- , marginTop: " 2px"
240- , padding: " 0px 6px"
241- , lineHeight: " 17px"
242- }
243-
244234 , " &[data-active=\" true\" ]" :
245235 { boxShadow: " inset 0 -1px 0 0 " <> cssStringHSLA colors.black
246236 , " & > a.lumi, & > a.lumi:hover, & > a.lumi:visited" :
0 commit comments