You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

35 lines
810 B

import "./Boi.sass";
import {WithChildren, WithStyle} from "../Shared";
import {useMemo} from "react";
interface BoiProps extends WithChildren, WithStyle {
vertical: "top" | "center" | "bottom"
horizontal: "left" | "center" | "right"
unchunky?: boolean
}
const defaultStyle = {fontSize: "3vmax"};
export function Boi({horizontal, vertical, unchunky, children, style}: BoiProps) {
const className = useMemo(() => {
const list = [
"Boi",
`Boi-h-${horizontal}`,
`Boi-v-${vertical}`,
];
if (!unchunky) {
list.push("Boi-chunky");
}
return list.join(" ");
}, [horizontal, vertical]);
return (
<div className={className}>
<div className="Boi-content" style={{...defaultStyle, ...(style || {})}}>
{children}
</div>
</div>
);
}