Commit 0793f965 authored by Steven's avatar Steven

chore: update heading styles

parent 8095d94c
......@@ -8,8 +8,21 @@ interface Props {
const Heading: React.FC<Props> = ({ level, children }: Props) => {
const Head = `h${level}` as keyof JSX.IntrinsicElements;
const className = (() => {
switch (level) {
case 1:
return "text-5xl leading-normal font-bold";
case 2:
return "text-3xl leading-normal font-medium";
case 3:
return "text-xl leading-normal font-medium";
case 4:
return "text-lg font-bold";
}
})();
return (
<Head>
<Head className={className}>
{children.map((child, index) => (
<Renderer key={`${child.type}-${index}`} node={child} />
))}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment