@bothub-chat/ui
Version:
Bothub UI Components
2 lines (1 loc) • 1.35 kB
JavaScript
import{styled as t}from"styled-components";import{getTypographyStyles as e}from"../typography/styled.js";const o=t.div.withConfig({displayName:"styled__Wrapper",componentId:"sc-3335oe-0"})(["display:inline-flex;flex-direction:row;align-items:center;gap:10px;--switch-width:","px;"],56),i=t.input.attrs((t=>Object.assign({type:"checkbox"},t))).withConfig({displayName:"styled__Checkbox",componentId:"sc-3335oe-1"})(["display:none;height:0;width:0;visibility:hidden;&:checked + label{background-color:",";&:after{left:calc(100% - 4px);transform:translateX(-100%);}}"],(t=>t.theme.colors.accent.primary)),a=t.label.withConfig({displayName:"styled__HiddenLabel",componentId:"sc-3335oe-2"})(["cursor:pointer;text-indent:-9999px;width:var(--switch-width,",");aspect-ratio:56 / 26;background:",";display:block;border-radius:100px;position:relative;&:after{content:'';position:absolute;top:0;left:4px;bottom:0;margin:auto;width:calc(var(--switch-width,",") * 0.33);height:calc(var(--switch-width,",") * 0.33);background:#fff;border-radius:50%;transition:0.2s linear;}"],56,(({theme:t})=>t.colors.grayScale.gray2),56,56),r=t.label.withConfig({displayName:"styled__TextLabel",componentId:"sc-3335oe-3"})([""," color:",";cursor:pointer;"],e("body-m-medium"),(({theme:t})=>t.colors.base.white));export{i as Checkbox,a as HiddenLabel,r as TextLabel,o as Wrapper};