import { Component } from "./jsx/jsx-runtime.ts";

export const Main: Component = (attributes, children) => (
    <div {...attributes} id="main">
        {...children}
    </div>
);

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("");
