my_digital_garden/quartz/components/Header.tsx

23 lines
433 B
TypeScript
Raw Normal View History

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