@bothub-chat/ui
Version:
Bothub UI Components
2 lines (1 loc) • 627 B
JavaScript
import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{useEffect as n}from"react";import{BothubGlobalStyleStyled as o}from"./styled.js";import{BothubScaleGlobalStyle as i}from"./scale/index.js";import"tslib";import"styled-components";const m=({margin:m,scale:s=null})=>(n((()=>{const e=()=>{const e=.01*window.innerHeight;document.documentElement.style.setProperty("--bothub-vh",`${e}px`)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),e(t,{children:[r(o,{$margin:m}),null!==s&&r(i,{variant:s})]}));export{m as BothubGlobalStyle,i as BothubScaleGlobalStyle};