cohost/html/emoji-land.tsx

42 lines
868 B
TypeScript
Raw Normal View History

2023-11-28 01:12:14 -05:00
import { Cycle, render_and_copy } from "./common.tsx";
const emojis = [
"🏡",
"🌳",
"🌲",
"🎄",
"🐦",
"🦊",
2023-11-28 01:50:46 -05:00
"🦌",
2023-11-28 01:12:14 -05:00
"🐶",
"🐕",
"🐩",
"🦈",
];
const Emoji = ({ children }: { children: string }) => <div>{children}</div>;
const Cell = () => (
2023-11-28 01:50:46 -05:00
<Cycle width_px={50} height_px={50} style={{}}>
2023-11-28 01:12:14 -05:00
<Emoji> </Emoji>
{...emojis.map(e => <Emoji>{e}</Emoji>)}
</Cycle>
);
render_and_copy(
<div
style={{
2023-11-28 01:50:46 -05:00
width: "calc(50px * 7)",
2023-11-28 01:12:14 -05:00
aspectRatio: "1",
margin: "0 auto",
display: "grid",
gridTemplateColumns: "repeat(7, 1fr)",
2023-11-28 01:50:46 -05:00
fontSize: "33px",
2023-11-28 01:12:14 -05:00
outline: "1px solid black",
backgroundColor: "#296639",
}}
>
{...Array.from({ length: 49 }, () => <Cell />)}
</div>
);