2023-06-12 15:46:38 +09:00
|
|
|
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
2023-06-02 08:05:14 +09:00
|
|
|
|
2023-06-12 15:46:38 +09:00
|
|
|
function Header({ children }: QuartzComponentProps) {
|
2023-06-19 02:47:07 +09:00
|
|
|
return (children.length > 0) ? <header>
|
2023-06-08 14:27:32 +09:00
|
|
|
{children}
|
2023-06-19 02:47:07 +09:00
|
|
|
</header> : null
|
2023-06-02 08:05:14 +09:00
|
|
|
}
|
2023-06-04 04:07:19 +09:00
|
|
|
|
2023-06-10 15:06:02 +09:00
|
|
|
Header.css = `
|
|
|
|
header {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
2023-06-19 02:47:07 +09:00
|
|
|
margin: 2em 0;
|
2023-07-03 05:08:29 +09:00
|
|
|
gap: 1.5rem;
|
2023-06-10 15:06:02 +09:00
|
|
|
}
|
|
|
|
|
2023-06-19 02:47:07 +09:00
|
|
|
header h1 {
|
2023-06-10 15:06:02 +09:00
|
|
|
margin: 0;
|
|
|
|
flex: auto;
|
|
|
|
}
|
|
|
|
`
|
2023-06-12 15:46:38 +09:00
|
|
|
|
|
|
|
export default (() => Header) satisfies QuartzComponentConstructor
|