emojis: honestly not bad
This commit is contained in:
parent
9360a02965
commit
81b2299a02
1 changed files with 41 additions and 0 deletions
41
html/emoji-land.tsx
Normal file
41
html/emoji-land.tsx
Normal file
|
@ -0,0 +1,41 @@
|
|||
import { Cycle, render_and_copy } from "./common.tsx";
|
||||
|
||||
const emojis = [
|
||||
"🏡",
|
||||
"🌳",
|
||||
"🌲",
|
||||
"🎄",
|
||||
"🐦",
|
||||
"🦊",
|
||||
"🐻",
|
||||
"🐶",
|
||||
"🐕",
|
||||
"🐩",
|
||||
"🦈",
|
||||
];
|
||||
|
||||
const Emoji = ({ children }: { children: string }) => <div>{children}</div>;
|
||||
|
||||
const Cell = () => (
|
||||
<Cycle width_px={60} height_px={60} style={{}}>
|
||||
<Emoji> </Emoji>
|
||||
{...emojis.map(e => <Emoji>{e}</Emoji>)}
|
||||
</Cycle>
|
||||
);
|
||||
|
||||
render_and_copy(
|
||||
<div
|
||||
style={{
|
||||
width: "calc(60px * 7)",
|
||||
aspectRatio: "1",
|
||||
margin: "0 auto",
|
||||
display: "grid",
|
||||
gridTemplateColumns: "repeat(7, 1fr)",
|
||||
fontSize: "40px",
|
||||
outline: "1px solid black",
|
||||
backgroundColor: "#296639",
|
||||
}}
|
||||
>
|
||||
{...Array.from({ length: 49 }, () => <Cell />)}
|
||||
</div>
|
||||
);
|
Loading…
Reference in a new issue