2022-07-13 22:39:01 +03:00
|
|
|
import * as React from "react";
|
|
|
|
|
import { FunctionComponent } from "react";
|
2022-07-14 13:38:00 +03:00
|
|
|
import { Context } from "../context/context";
|
2022-07-13 22:39:01 +03:00
|
|
|
|
|
|
|
|
const FloatingPanel: FunctionComponent<{
|
|
|
|
|
context: Context;
|
|
|
|
|
color: string;
|
|
|
|
|
visible: boolean;
|
|
|
|
|
}> = (props) => {
|
|
|
|
|
if(!props.visible) return <></>
|
|
|
|
|
return (
|
|
|
|
|
<div style={{
|
|
|
|
|
position: "absolute",
|
|
|
|
|
bottom: "0px",
|
|
|
|
|
left: "0px",
|
|
|
|
|
padding: "15px",
|
|
|
|
|
borderTopRightRadius: "1vw",
|
|
|
|
|
minWidth: "10vw",
|
|
|
|
|
minHeight: "1vw",
|
|
|
|
|
backgroundColor: props.color,
|
|
|
|
|
}}>
|
|
|
|
|
{props.children}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default FloatingPanel;
|