use styled-jsx in FloatingPanel

This commit is contained in:
Halit Aksoy 2022-07-14 17:46:59 +03:00
parent d7f8301e59
commit 8f028e2b51

View File

@ -10,15 +10,19 @@ const FloatingPanel: FunctionComponent<{
if(!props.visible) return <></> if(!props.visible) return <></>
return ( return (
<div style={{ <div style={{
position: "absolute",
bottom: "0px",
left: "0px",
padding: "15px",
borderTopRightRadius: "1vw",
minWidth: "10vw",
minHeight: "1vw",
backgroundColor: props.color, backgroundColor: props.color,
}}> }}>
<style jsx>{`
div {
position: absolute;
bottom: 0px;
left: 0px;
padding: 15px;
border-top-right-radius: 1vw;
min-width: 10vw;
min-height: 1vw;
}
`}</style>
{props.children} {props.children}
</div> </div>
) )