mancala/src/components/FloatingPanel.tsx

27 lines
582 B
TypeScript
Raw Normal View History

2022-07-13 22:39:01 +03:00
import * as React from "react";
import { FunctionComponent } from "react";
import { Context } from "../context";
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;