homeman-deno/components/SectionHead.tsx

21 lines
411 B
TypeScript
Raw Permalink Normal View History

2024-01-09 23:06:44 -06:00
import { JSX } from 'preact'
export interface Props extends JSX.HTMLAttributes<HTMLElement> {
text: string
}
export function SectionHead(
{ text, children, className, ...props }: Props,
) {
return (
<header
{...props}
class={`flex items-center border-b-2 border-stone-500/20 ${className}`}
>
<h1 class='flex items-center gap-4 p-5 text-2xl'>
{text}
{children}
</h1>
</header>
)
}