web/components/Layout.tsx
2025-10-27 04:10:26 -03:00

32 lines
602 B
TypeScript

/**
* Copyright (c) 2025 xwra
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { ComponentChildren } from "preact";
interface LayoutProps {
children: ComponentChildren;
[key: string]: any;
}
export function Section({ children, class: className, ...props }: LayoutProps) {
return (
<div
{...props}
class={`section ${className || ""}`}
>
{children}
</div>
);
}
export function Centered(
{ children, class: className, ...props }: LayoutProps,
) {
return (
<div class={`centered ${className || ""}`} {...props}>
{children}
</div>
);
}