diff --git a/src/components/ChainIDBadge.re b/src/components/ChainIDBadge.re index c2283500..5c224fe4 100644 --- a/src/components/ChainIDBadge.re +++ b/src/components/ChainIDBadge.re @@ -5,11 +5,11 @@ module Styles = { style([ display(`flex), borderRadius(`px(8)), - border(`px(1), `solid, isDarkMode ? theme.neutral_100 : theme.neutral_600), + // border(`px(1), `solid, isDarkMode ? theme.neutral_100 : theme.neutral_600), backgroundColor(theme.neutral_000), - padding2(~v=`px(8), ~h=`px(10)), + padding2(~v=`px(8), ~h=`px(16)), minWidth(`px(153)), - justifyContent(`spaceBetween), + // justifyContent(`spaceBetween), alignItems(`center), position(`relative), cursor(`pointer), @@ -43,8 +43,40 @@ module Styles = { padding2(~v=`px(5), ~h=`px(10)), hover([backgroundColor(theme.neutral_100)]), ]); + let buttonContainer = style([Media.mobile([width(`percent(100.))])]); + let baseBtn = + style([ + textAlign(`center), + Media.mobile([flexGrow(0.), flexShrink(0.), flexBasis(`percent(50.))]), + ]); + + let leftBtn = (state, theme: Theme.t, isDarkMode) => { + style([ + borderTopRightRadius(`zero), + borderBottomRightRadius(`zero), + backgroundColor(state ? theme.neutral_900 : theme.neutral_000), + color(state ? theme.neutral_100 : theme.neutral_900), + hover([ + backgroundColor(state ? theme.neutral_900 : theme.neutral_100), + color(state ? theme.neutral_100 : theme.neutral_900), + ]), + ]); + }; + let rightBtn = (state, theme: Theme.t, isDarkMode) => { + style([ + borderTopLeftRadius(`zero), + borderBottomLeftRadius(`zero), + color(state ? theme.neutral_900 : theme.neutral_100), + backgroundColor(state ? theme.neutral_000 : theme.neutral_900), + hover([ + backgroundColor(state ? theme.neutral_100 : theme.neutral_900), + color(state ? theme.neutral_900 : theme.neutral_100), + ]), + ]); + }; }; + type chainID = | WenchangTestnet | WenchangMainnet @@ -109,7 +141,7 @@ let getName = | Unknown => "unknown"; [@react.component] -let make = () => +let make = (~dropdown=false) => { let (show, setShow) = React.useState(_ => false); let trackingSub = TrackingSub.use(); @@ -118,7 +150,18 @@ let make = () => let%Sub tracking = trackingSub; let currentChainID = tracking.chainID->parseChainID; -