From c813672d67b8e93f01968579eace8632e717a15b Mon Sep 17 00:00:00 2001 From: Daniel <95984847+danboyce92@users.noreply.github.com> Date: Wed, 3 Jan 2024 09:23:56 +0000 Subject: [PATCH] Toolbar is hidden while publishing an article (#682) * Toolbar is hidden while publishing an article * removed additional logic and adjusted z-index --- .../editor/editor/components/Toolbar/Toolbar.module.css | 6 ++++-- components/editor/editor/components/Toolbar/Toolbar.tsx | 4 ++-- components/editor/editor/index.tsx | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/components/editor/editor/components/Toolbar/Toolbar.module.css b/components/editor/editor/components/Toolbar/Toolbar.module.css index 80eb7510..9e47edf3 100644 --- a/components/editor/editor/components/Toolbar/Toolbar.module.css +++ b/components/editor/editor/components/Toolbar/Toolbar.module.css @@ -1,11 +1,11 @@ .sticky { position: sticky; top: 0; - z-index: 50; + z-index: 10; width: 100%; margin-bottom: 1em; } - + .flex { display: flex; justify-content: space-between; @@ -98,3 +98,5 @@ input:checked + .slider::before { visibility: 1; opacity: 1; } + + diff --git a/components/editor/editor/components/Toolbar/Toolbar.tsx b/components/editor/editor/components/Toolbar/Toolbar.tsx index 8b20ac93..2ccdcf8a 100644 --- a/components/editor/editor/components/Toolbar/Toolbar.tsx +++ b/components/editor/editor/components/Toolbar/Toolbar.tsx @@ -38,7 +38,7 @@ export interface ToolbarItem { command: () => void; icon: typeof BoldIcon; } - + function Toolbar({ editor }: ToolbarProps) { const [isOpen, setIsOpen] = useState(true); const [, setIsTableEditing] = useState(false); @@ -72,7 +72,7 @@ function Toolbar({ editor }: ToolbarProps) { }; return ( -