slanted-gamedev-toolz
Version:
A slanted mix of tools for your brilliant ideas in game design.
22 lines (21 loc) • 783 B
JavaScript
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
import { useMemo } from "react";
import { imgBoxShadow, textOutline } from "./GameCardSx";
export const ImgEmoji = ({ emoji, infoLength }) => {
const fontSize = useMemo(() => {
if (infoLength < 200)
return "5em";
return "3em";
}, [infoLength]);
return (_jsx(_Fragment, { children: _jsx("div", { style: {
fontSize: fontSize,
display: "flex",
flexWrap: "wrap",
flexGrow: 1,
flexDirection: "row",
justifyContent: "center",
alignItems: "center",
...imgBoxShadow,
...textOutline.blackHalf,
}, children: emoji }) }));
};