Merge pull request #1881 from appwrite/toc-update

update for levels
This commit is contained in:
Jesse Winton
2025-03-28 13:05:15 -04:00
committed by GitHub
3 changed files with 6 additions and 4 deletions

View File

@@ -50,8 +50,8 @@
'before:bg-greyscale-300 before:absolute before:top-0 before:left-0 before:h-6 before:w-px before:rounded-full before:opacity-0 before:transition-opacity',
{
'font-medium': parent.level && parent.level === 1,
'ps-6': parent.level && parent.level === 2,
'ps-12': parent.level && parent.level >= 3,
'pl-12': parent.level && parent.level === 2,
'ps-16': parent.level && parent.level >= 3,
'before:opacity-100': parent.selected
}
)}

View File

@@ -54,7 +54,8 @@
title: heading.title,
href: `#${id}`,
step: heading.step,
selected: selected === id
selected: selected === id,
level: heading.level
});
return carry;
}, []);

View File

@@ -52,7 +52,8 @@
title: heading.title,
href: `#${id}`,
step: heading.step,
selected: selected === id
selected: selected === id,
level: heading.level
});
return carry;
}, []);