Open
Description
Similar on how switch%style_label
works, but with cx
let boxBackground = bg =>
switch%style_label (bg) {
| Transparent => []
| Sheet => [backgroundColor(Color.Background.box), boxShadows(BoxShadow.elevation1)]
| SheetWithShadowElevation3 => [backgroundColor(Color.Background.box), boxShadows(BoxShadow.elevation3)]
| SidebarItemSelected => [backgroundColor(Color.Background.sidebarItemSelected)]
| AccentMuted => [backgroundColor(Color.Background.accentMuted)]
| NavBarWithShadow => [
backgroundColor(ColorAlt.Background.box),
boxShadow(Shadow.box(~inset=true, ~y=`px(-1), Color.Border.lineAlpha)),
]
| NavBar => [backgroundColor(ColorAlt.Background.box)]
| Code => [backgroundColor(Color.Background.codeAlpha)]
| Dark => [backgroundColor(Color.Background.boxDark)]
};