cohost/html/common.tsx

23 lines
562 B
TypeScript
Raw Normal View History

2023-07-10 14:52:20 -04:00
import { Component } from "./jsx/jsx-runtime.ts";
export const Main: Component = (attributes, children) => (
<div {...attributes} id="main">
{...children}
</div>
);
2023-07-12 07:05:48 -04:00
export const HCenter: Component = (attributes, children) => (
<div
{...attributes}
class="hcenter"
style="display: flex; justify-content: center;"
>
{...children}
</div>
);
export const styles = (s: Record<string, string | number>): string =>
Object.entries(s)
.map(([rule, val]) => `${rule}: ${val};`)
.join("");