Skip to content

Commit

Permalink
add divider when action menu is displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Nov 10, 2020
1 parent cc5bcc7 commit aea10e6
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
display: none;
}

.tagMgt__actionBarDivider {
height: $euiSize;
border-right: $euiBorderThin;
}

.tagMgt__actionBar {
border-bottom: $euiBorderThin;
padding-bottom: $euiSizeS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const ActionBar: FC<ActionBarProps> = ({

return (
<div className="tagMgt__actionBar">
<EuiFlexGroup justifyContent="flexStart" alignItems="baseline" gutterSize="m">
<EuiFlexGroup justifyContent="flexStart" alignItems="center" gutterSize="m">
<EuiFlexItem grow={false}>
<EuiText size="xs" color="subdued">
<FormattedMessage
Expand All @@ -83,33 +83,38 @@ export const ActionBar: FC<ActionBarProps> = ({
</EuiText>
</EuiFlexItem>
{selectedCount > 0 && (
<EuiFlexItem grow={false}>
<EuiPopover
isOpen={isPopoverOpened}
closePopover={closePopover}
panelPaddingSize="none"
button={
<EuiText size="xs">
<EuiLink onClick={togglePopover} data-test-subj="actionBar-contextMenuButton">
<FormattedMessage
id="xpack.savedObjectsTagging.management.actionBar.selectedTagsLabel"
defaultMessage="{count, plural, one {1 selected tag} other {# selected tags}}"
values={{
count: selectedCount,
}}
/>
<EuiIcon className="tagMgt__actionBarIcon" type="arrowDown" size="s" />
</EuiLink>
</EuiText>
}
>
<EuiContextMenu
initialPanelId={0}
panels={contextMenuPanels}
data-test-subj="actionBar-contextMenu"
/>
</EuiPopover>
</EuiFlexItem>
<>
<EuiFlexItem grow={false}>
<div className="tagMgt__actionBarDivider" />
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiPopover
isOpen={isPopoverOpened}
closePopover={closePopover}
panelPaddingSize="none"
button={
<EuiText size="xs">
<EuiLink onClick={togglePopover} data-test-subj="actionBar-contextMenuButton">
<FormattedMessage
id="xpack.savedObjectsTagging.management.actionBar.selectedTagsLabel"
defaultMessage="{count, plural, one {1 selected tag} other {# selected tags}}"
values={{
count: selectedCount,
}}
/>
<EuiIcon className="tagMgt__actionBarIcon" type="arrowDown" size="s" />
</EuiLink>
</EuiText>
}
>
<EuiContextMenu
initialPanelId={0}
panels={contextMenuPanels}
data-test-subj="actionBar-contextMenu"
/>
</EuiPopover>
</EuiFlexItem>
</>
)}
</EuiFlexGroup>
</div>
Expand Down

0 comments on commit aea10e6

Please sign in to comment.