From 5bea6a1b8a7bb26b4353dfc2d7f97039fb731b68 Mon Sep 17 00:00:00 2001 From: 3y3 <3y3@ya.ru> Date: Sun, 15 Oct 2023 01:39:13 +0300 Subject: [PATCH] fix: Small fixes for mobile view --- src/components/Controls/Controls.tsx | 4 ++++ src/components/DocPage/DocPage.scss | 2 +- src/components/Toc/Toc.scss | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/Controls/Controls.tsx b/src/components/Controls/Controls.tsx index b3c7bc3a..e7dcbd34 100644 --- a/src/components/Controls/Controls.tsx +++ b/src/components/Controls/Controls.tsx @@ -174,6 +174,10 @@ const Controls = memo((props) => { return result; }, [] as React.ReactElement[]); + if (!controls.length) { + return null; + } + return
{controls}
; }); diff --git a/src/components/DocPage/DocPage.scss b/src/components/DocPage/DocPage.scss index 5cb4ffba..55a759bf 100644 --- a/src/components/DocPage/DocPage.scss +++ b/src/components/DocPage/DocPage.scss @@ -223,7 +223,7 @@ } &__controls { - padding-left: 20px; + padding-left: 12px; position: static; } diff --git a/src/components/Toc/Toc.scss b/src/components/Toc/Toc.scss index 2513444f..e83b4b8d 100644 --- a/src/components/Toc/Toc.scss +++ b/src/components/Toc/Toc.scss @@ -19,6 +19,11 @@ $leftOffset: 57px; overflow-y: hidden; border-right: 1px solid var(--g-color-line-generic); + .mobile & { + border-top: 1px solid var(--g-color-line-generic); + border-right: none; + } + &__empty { padding: 5px 15px 5px 24px; }