@bothub-chat/ui
Version:
Bothub UI Components
2 lines (1 loc) • 1.54 kB
JavaScript
import{styled as e,css as o}from"styled-components";import{adaptive as r}from"../../adaptive/index.js";const i=e.div.withConfig({displayName:"styled__ScrollbarStyled",componentId:"sc-tlqpsa-0"})(["position:relative;width:inherit;height:inherit;overflow:",";"],(({$overflow:e})=>{switch(e){case"auto":return"hidden";case"visible":return"visible"}})),t=e.div.withConfig({displayName:"styled__ScrollbarContent",componentId:"sc-tlqpsa-1"})(["position:relative;width:inherit;height:inherit;overflow:",";",""],(({$overflow:e})=>{switch(e){case"auto":return"auto";case"visible":return"visible"}}),(({theme:e,$disabled:i,$size:t,$variant:a})=>i?o(["&::-webkit-scrollbar{display:none;}"]):o(["&::-webkit-scrollbar{width:",";height:",";background:",";","}&::-webkit-scrollbar-thumb{background:",";","}&::-webkit-scrollbar-track{background:",";","}&::-webkit-scrollbar-corner{display:none;}",""],`${t}px`,`${t}px`,e.colors.grayScale.gray4,"secondary"===a&&o(["border-radius:",";"],t/2+"px"),"light"===e.mode?e.colors.accent.primary:e.colors.accent.primaryLight,"secondary"===a&&o(["border-radius:",";"],t/2+"px"),(({theme:e})=>"light"===e.mode?e.colors.grayScale.gray4:e.colors.grayScale.gray5),"secondary"===a&&o(["border-radius:",";"],t/2+"px"),r((()=>({touch:o(["&::-webkit-scrollbar{display:none;}"])})))))),a=e.div.withConfig({displayName:"styled__ScrollbarShadows",componentId:"sc-tlqpsa-2"})(["position:absolute;top:0px;bottom:0px;left:0px;right:0px;pointer-events:none;"]);export{t as ScrollbarContent,a as ScrollbarShadows,i as ScrollbarStyled};