fix(toc): dynamic height on ScrollArea

This commit is contained in:
jason 2024-10-02 01:04:06 -07:00
parent befd21edb9
commit 818c23fc75
3 changed files with 4 additions and 4 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "astro-erudite",
"version": "1.1.4",
"version": "1.1.5",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "astro-erudite",
"version": "1.1.4",
"version": "1.1.5",
"dependencies": {
"@astrojs/check": "^0.7.0",
"@astrojs/markdown-remark": "^5.2.0",

View file

@ -1,7 +1,7 @@
{
"name": "astro-erudite",
"type": "module",
"version": "1.1.4",
"version": "1.1.5",
"private": true,
"scripts": {
"dev": "astro dev",

View file

@ -47,7 +47,7 @@ function buildToc(headings: Heading[]): Heading[] {
class="size-5 transition-transform group-open:rotate-180"
/>
</summary>
<ScrollArea client:load className="h-64" type="always">
<ScrollArea client:load className="flex max-h-64 flex-col overflow-y-auto" type="always">
<nav>
<ul class="pt-3">
{toc.map((heading) => <TableOfContentsHeading heading={heading} />)}