mirror of
https://github.com/usememos/memos.git
synced 2025-02-16 03:12:13 +01:00
chore: update heading styles
This commit is contained in:
parent
8095d94c97
commit
0793f96578
@ -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} />
|
||||
))}
|
||||
|
Loading…
x
Reference in New Issue
Block a user