Fix positioning of space name and avatar in selector dropdown (#94169)

This commit is contained in:
Larry Gregory 2021-03-09 17:42:38 -05:00 committed by GitHub
parent 086762da6a
commit d2b9caa1a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -15,3 +15,7 @@
margin: $euiSizeM;
width: calc(100% - #{$euiSizeM*2});
}
.spcMenu__item {
margin-left: $euiSizeM;
}

View file

@ -133,14 +133,12 @@ class SpacesMenuUI extends Component<Props, State> {
return (
<div key="manageSpacesSearchField" className="spcMenu__searchFieldWrapper">
{
// @ts-ignore
<EuiFieldSearch
placeholder={intl.formatMessage({
id: 'xpack.spaces.navControl.spacesMenu.findSpacePlaceholder',
defaultMessage: 'Find a space',
})}
incremental={true}
// FIXME needs updated typedef
onSearch={this.onSearch}
onKeyDown={this.onSearchKeyDown}
onFocus={this.onSearchFocus}
@ -159,7 +157,7 @@ class SpacesMenuUI extends Component<Props, State> {
const keyCode = e.keyCode;
if (focusableKeyCodes.includes(keyCode)) {
// Allows the spaces list panel to recieve focus. This enables keyboard and screen reader navigation
// Allows the spaces list panel to receive focus. This enables keyboard and screen reader navigation
this.setState({
allowSpacesListFocus: true,
});
@ -206,7 +204,7 @@ class SpacesMenuUI extends Component<Props, State> {
toolTipTitle={space.description && space.name}
toolTipContent={space.description}
>
{space.name}
<EuiText className="spcMenu__item">{space.name}</EuiText>
</EuiContextMenuItem>
);
};