feat(table-of-contents): implement scrollable TOC with radix-ui

- Add @radix-ui/react-scroll-area dependency
- Create scroll-area component with custom styling
- Refactor TOC layout to use scroll-area component
- Improve TOC styling and active state transitions
- Apply consistent TOC styling across blog and about layouts
This commit is contained in:
joyzhao
2025-06-19 12:36:35 +08:00
parent 8cecab8479
commit 8fbeec7dc8
6 changed files with 265 additions and 48 deletions

View File

@@ -17,6 +17,7 @@
},
"dependencies": {
"@astrojs/react": "^4.2.1",
"@radix-ui/react-scroll-area": "^1.2.9",
"@radix-ui/react-slot": "^1.1.2",
"@tailwindcss/vite": "^4.0.14",
"@types/react": "^19.0.12",