From 0ed466f40455da989fa48fa4f329c372bb3b7e06 Mon Sep 17 00:00:00 2001 From: vezwork Date: Tue, 26 Jul 2022 08:16:16 -0400 Subject: [PATCH] Hide toolbar divider when no extensions are there --- .../toolbars/ExtensionToolbar/ExtensionToolbar.tsx | 14 ++++++++++---- theatre/studio/src/toolbars/GlobalToolbar.tsx | 3 +-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/theatre/studio/src/toolbars/ExtensionToolbar/ExtensionToolbar.tsx b/theatre/studio/src/toolbars/ExtensionToolbar/ExtensionToolbar.tsx index aba1825..2f6050b 100644 --- a/theatre/studio/src/toolbars/ExtensionToolbar/ExtensionToolbar.tsx +++ b/theatre/studio/src/toolbars/ExtensionToolbar/ExtensionToolbar.tsx @@ -62,9 +62,10 @@ const ExtensionToolsetRender: React.FC<{ return } -export const ExtensionToolbar: React.FC<{toolbarId: string}> = ({ - toolbarId, -}) => { +export const ExtensionToolbar: React.FC<{ + toolbarId: string + showLeftDivider?: boolean +}> = ({toolbarId, showLeftDivider}) => { const groups: Array = [] const extensionsById = useVal(getStudio().atomP.ephemeral.extensions.byId) @@ -84,7 +85,12 @@ export const ExtensionToolbar: React.FC<{toolbarId: string}> = ({ if (groups.length === 0) return null - return {groups} + return ( + + {showLeftDivider ? : undefined} + {groups} + + ) } export default ExtensionToolbar diff --git a/theatre/studio/src/toolbars/GlobalToolbar.tsx b/theatre/studio/src/toolbars/GlobalToolbar.tsx index 864edce..bd54032 100644 --- a/theatre/studio/src/toolbars/GlobalToolbar.tsx +++ b/theatre/studio/src/toolbars/GlobalToolbar.tsx @@ -142,13 +142,12 @@ const GlobalToolbar: React.FC = () => { unpinHintIcon={} pinned={outlinePinned} /> - {conflicts.length > 0 ? ( {conflicts.length} ) : null} - + {moreMenu}