Skip to content

Commit dbfb13d

Browse files
authored
fix: migrated Sidebar component to Tailwind CSS
1 parent d838e4f commit dbfb13d

2 files changed

Lines changed: 8 additions & 72 deletions

File tree

src/components/Sidebar/Sidebar.jsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ import LoadingIcon from "../../styles/icons/loading.svg";
66
import Print from "../Print/Print.jsx";
77
import SidebarItem from "../SidebarItem/SidebarItem.jsx";
88

9-
// Load Styling
10-
import "./Sidebar.scss";
11-
129
const versions = [5, 4];
1310
const currentDocsVersion = 5;
1411

@@ -28,9 +25,11 @@ export default function Sidebar({ className = "", pages, currentPage }) {
2825
let group;
2926

3027
return (
31-
<nav className={`sidebar ${className}`}>
32-
<div className="sidebar__inner">
33-
<div className="relative z-0 bg-white dark:bg-gray-100 ">
28+
<nav
29+
className={`hidden md:block w-full max-w-[280px] will-change-transform ${className}`}
30+
>
31+
<div className="p-6 sticky top-[-1px] overflow-y-auto max-h-screen">
32+
<div className="relative z-0 bg-white dark:bg-gray-100">
3433
<label htmlFor="docs-version" className="sr-only">
3534
Select webpack version
3635
</label>
@@ -75,7 +74,9 @@ export default function Sidebar({ className = "", pages, currentPage }) {
7574
return (
7675
<div key={page.url}>
7776
{displayGroup ? (
78-
<h4 className="sidebar__group">{group}</h4>
77+
<h4 className="mt-6 ml-1 capitalize text-lg font-bold text-slate-800">
78+
{group}
79+
</h4>
7980
) : null}
8081

8182
<SidebarItem

src/components/Sidebar/Sidebar.scss

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)