mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-25 06:56:38 +00:00
Fix resource tree styling (#1926)
* Fix style for when no global command * Fix style override expression --------- Co-authored-by: Laurent Nguyen <languye@microsoft.com>
This commit is contained in:
parent
806a0657df
commit
58ae64193f
@ -249,6 +249,12 @@ export const SidebarContainer: React.FC<SidebarProps> = ({ explorer }) => {
|
|||||||
setLoading(false);
|
setLoading(false);
|
||||||
}, [setLoading]);
|
}, [setLoading]);
|
||||||
|
|
||||||
|
const hasGlobalCommands = !(
|
||||||
|
configContext.platform === Platform.Fabric ||
|
||||||
|
userContext.apiType === "Postgres" ||
|
||||||
|
userContext.apiType === "VCoreMongo"
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Allotment ref={allotment} onChange={onChange} onDragEnd={onDragEnd} className="resourceTreeAndTabs">
|
<Allotment ref={allotment} onChange={onChange} onDragEnd={onDragEnd} className="resourceTreeAndTabs">
|
||||||
{/* Collections Tree - Start */}
|
{/* Collections Tree - Start */}
|
||||||
@ -285,8 +291,11 @@ export const SidebarContainer: React.FC<SidebarProps> = ({ explorer }) => {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.expandedContent}>
|
<div
|
||||||
<GlobalCommands explorer={explorer} />
|
className={styles.expandedContent}
|
||||||
|
style={!hasGlobalCommands ? { gridTemplateRows: "1fr" } : undefined}
|
||||||
|
>
|
||||||
|
{hasGlobalCommands && <GlobalCommands explorer={explorer} />}
|
||||||
<ResourceTree explorer={explorer} />
|
<ResourceTree explorer={explorer} />
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
Loading…
Reference in New Issue
Block a user