From 01afd013258a17502445652b2a248a914e3dc2cf Mon Sep 17 00:00:00 2001 From: Strek Date: Mon, 29 Nov 2021 23:17:46 +0530 Subject: [PATCH] [Beta]Move all possible style to tailwind classes (#4054) * Move all possible style to tailwind classes * Update Sidebar.tsx * fix-collapsable-color * dry run and commit * Update SidebarLink.tsx * Fixes review comments for aria tags * Remove extended tailwind configs * Update tailwind.config.js * Update Sidebar.tsx --- beta/src/components/Layout/Page.tsx | 4 +- .../src/components/Layout/Sidebar/Sidebar.tsx | 10 ++-- .../Layout/Sidebar/SidebarRouteTree.tsx | 3 +- beta/src/components/MDX/APIAnatomy.tsx | 3 -- beta/src/components/MDX/Heading.tsx | 10 ++-- beta/src/components/MDX/Sandpack/Preview.tsx | 46 +++++++++---------- beta/src/components/Search.tsx | 3 +- 7 files changed, 33 insertions(+), 46 deletions(-) diff --git a/beta/src/components/Layout/Page.tsx b/beta/src/components/Layout/Page.tsx index 755c167c..2f8ad2f4 100644 --- a/beta/src/components/Layout/Page.tsx +++ b/beta/src/components/Layout/Page.tsx @@ -25,9 +25,7 @@ export function Page({routeTree, children}: PageProps) {
-
+
{children}
diff --git a/beta/src/components/Layout/Sidebar/Sidebar.tsx b/beta/src/components/Layout/Sidebar/Sidebar.tsx index a5539263..0b03a73a 100644 --- a/beta/src/components/Layout/Sidebar/Sidebar.tsx +++ b/beta/src/components/Layout/Sidebar/Sidebar.tsx @@ -18,7 +18,7 @@ export function Sidebar({isMobileOnly}: {isMobileOnly?: boolean}) { const {menuRef, isOpen} = React.useContext(MenuContext); const isMobileSidebar = useMediaQuery(SIDEBAR_BREAKPOINT); let routeTree = React.useContext(SidebarContext); - const isHidden = isMobileOnly && !isMobileSidebar; + const isHidden = isMobileSidebar ? !isOpen : false; // HACK. Fix up the data structures instead. if ((routeTree as any).routes.length === 1) { @@ -62,14 +62,10 @@ export function Sidebar({isMobileOnly}: {isMobileOnly?: boolean}) { return (