| | |
| | | import { QuartzComponentProps } from "./types" |
| | | import { QuartzComponentConstructor, QuartzComponentProps } from "./types" |
| | | |
| | | export default function Header({ children }: QuartzComponentProps) { |
| | | return <header> |
| | | function Header({ children }: QuartzComponentProps) { |
| | | return (children.length > 0) ? <header> |
| | | {children} |
| | | </header> |
| | | </header> : null |
| | | } |
| | | |
| | | Header.css = ` |
| | |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | margin: 1em 0 2em 0; |
| | | & > h1 { |
| | | } |
| | | margin: 2em 0; |
| | | gap: 1.5rem; |
| | | } |
| | | |
| | | header > h1 { |
| | | header h1 { |
| | | margin: 0; |
| | | flex: auto; |
| | | } |
| | | ` |
| | | |
| | | export default (() => Header) satisfies QuartzComponentConstructor |