forked from
tangled.org/core
Mirror of @tangled.org/core. Running on a Raspberry Pi Zero 2 (Please be gentle).
1import type { ComponentChildren } from "preact";
2
3interface StyleProps {
4 style?: Record<string, string | number>;
5 children?: ComponentChildren;
6}
7
8export function Card({ children, style }: StyleProps) {
9 return (
10 <div
11 style={{
12 width: 1200,
13 height: 630,
14 background: "white",
15 display: "flex",
16 flexDirection: "column",
17 padding: 48,
18 ...style,
19 }}>
20 {children}
21 </div>
22 );
23}
24
25export function Row({ children, style }: StyleProps) {
26 return (
27 <div
28 style={{
29 display: "flex",
30 flexDirection: "row",
31 alignItems: "center",
32 ...style,
33 }}>
34 {children}
35 </div>
36 );
37}
38
39export function Col({ children, style }: StyleProps) {
40 return (
41 <div style={{ display: "flex", flexDirection: "column", ...style }}>
42 {children}
43 </div>
44 );
45}