rizaldy.club/quartz/components/Header.tsx

23 lines
433 B
TypeScript
Raw Normal View History

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