explorer: fix toolbar buttons wrapping

This fixes the toolbar buttons wrapping when the text overflows.
This commit is contained in:
David Lechner
2022-05-31 12:51:55 -05:00
parent 56e1505f14
commit 012d6b029e
2 changed files with 22 additions and 7 deletions
+5 -2
View File
@@ -111,10 +111,13 @@ const FileActionButtonGroup: React.VoidFunctionComponent<ActionButtonGroupProps>
return (
<ButtonGroup
aria-hidden={true}
className="pb-explorer-file-action-button-group"
className="pb-explorer-file-tree-action-button-group"
minimal={true}
>
<Toolbar firstFocusableItemId={duplicateButtonId}>
<Toolbar
className="pb-explorer-file-tree-action-toolbar"
firstFocusableItemId={duplicateButtonId}
>
<ActionButton
id={renameButtonId}
icon="edit"
+17 -5
View File
@@ -3,14 +3,26 @@
@use '@blueprintjs/core/lib/scss/variables' as bp;
// reveal file action buttons on hover
.#{bp.$ns}-tree-node-content:not(:hover) .pb-explorer-file-action-button-group {
display: none;
}
.pb-explorer {
&-header-toolbar {
display: flex;
justify-content: flex-end;
}
&-file-tree {
// don't need extra padding around toolbar
& .#{bp.$ns}-tree-node-secondary-label {
padding: unset;
}
// reveal file action toolbar on hover
.#{bp.$ns}-tree-node-content:not(:hover) &-action-button-group {
display: none;
}
// fix layout since we are nesting toolbar in button group
&-action-toolbar {
display: inline-flex;
}
}
}