keroosha.cybergulag.today/quartz/components/Header.tsx

23 lines
433 B
TypeScript
Raw Permalink Normal View History

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