Optimize stylesheet in HideScrollbar

This commit is contained in:
2023-09-10 11:43:50 +08:00
parent 2a6c478620
commit e225194c14
2 changed files with 15 additions and 18 deletions

View File

@@ -151,15 +151,17 @@ const HideScrollbar = forwardRef<HideScrollbarElement, PropsWithChildren>((props
return (
<>
<div
ref={rootRef}
id={'hide-scrollbar'}
style={{
width: `calc(100vw + ${verticalScrollbarWidth}px)`,
height: `calc(100vh + ${horizontalScrollbarWidth}px`
}}
>
{props.children}
<div className={'hide-scrollbar-mask'}>
<div
ref={rootRef}
className={'hide-scrollbar-selection'}
style={{
width: `calc(100vw + ${verticalScrollbarWidth}px)`,
height: `calc(100vh + ${horizontalScrollbarWidth}px`
}}
>
{props.children}
</div>
</div>
</>
)