23 lines
470 B
TypeScript
Raw Normal View History

import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
2023-06-01 19:05:14 -04:00
const Header: QuartzComponent = ({ children }: QuartzComponentProps) => {
2023-07-22 17:27:41 -07:00
return children.length > 0 ? <header>{children}</header> : null
2023-06-01 19:05:14 -04:00
}
2023-06-03 15:07:19 -04:00
2023-06-09 23:06:02 -07:00
Header.css = `
header {
display: flex;
flex-direction: row;
align-items: center;
2023-07-23 11:02:45 -07:00
margin: 2rem 0;
2023-07-02 13:08:29 -07:00
gap: 1.5rem;
2023-06-09 23:06:02 -07:00
}
2023-06-18 10:47:07 -07:00
header h1 {
2023-06-09 23:06:02 -07:00
margin: 0;
flex: auto;
}
`
2023-06-11 23:46:38 -07:00
export default (() => Header) satisfies QuartzComponentConstructor