File size: 1,890 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
import { Box, BoxProps } from "@chakra-ui/react"
export const H1 = (props: BoxProps) => {
return (
<Box
as="h1"
css={{
color: "fg",
fontSize: "1.5em",
letterSpacing: "-0.02em",
marginTop: "0",
marginBottom: "0.8em",
lineHeight: "1.2em",
fontWeight: "medium",
scrollMarginTop: "calc(var(--header-height) + 1.5em)",
}}
{...props}
/>
)
}
export const H2 = (props: BoxProps) => {
return (
<Box
as="h2"
css={{
color: "fg",
fontSize: "1.3em",
letterSpacing: "-0.02em",
marginTop: "1.6em",
marginBottom: "0.8em",
lineHeight: "1.4em",
fontWeight: "semibold",
scrollMarginTop: "calc(var(--header-height) + 1.5em)",
"& code": { fontSize: "0.9em" },
"& + *": { marginTop: "0" },
"& a": { font: "inherit!" },
}}
{...props}
/>
)
}
export const H3 = (props: BoxProps) => {
return (
<Box
as="h3"
css={{
color: "fg",
fontSize: "1.2em",
letterSpacing: "-0.01em",
marginTop: "1.5em",
marginBottom: "0.4em",
fontWeight: "semibold",
lineHeight: "1.5em",
scrollMarginTop: "calc(var(--header-height) + 1.5em)",
"& code": { fontSize: "0.9em" },
"& + *": { marginTop: "0" },
"& a": { font: "inherit!" },
}}
{...props}
/>
)
}
export const H4 = (props: BoxProps) => {
return (
<Box
as="h4"
css={{
color: "fg",
marginTop: "2em",
marginBottom: "0.8em",
letterSpacing: "-0.01em",
fontWeight: "semibold",
lineHeight: "1.5em",
scrollMarginTop: "calc(var(--header-height) + 1.5em)",
"& + *": { marginTop: "0" },
"& a": { font: "inherit!" },
}}
{...props}
/>
)
}
|