Remove wrapper around manage spaces button in menu (#24506) (#24525)

Fixes #23544
This commit is contained in:
Caroline Horn 2018-10-24 15:51:08 -04:00 committed by GitHub
parent 7e251463fe
commit 73e8260d3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 12 deletions

View file

@ -4,7 +4,6 @@ exports[`ManageSpacesButton doesn't render if user profile forbids managing spac
exports[`ManageSpacesButton renders as expected 1`] = `
<EuiButton
className="manage-spaces-button"
color="primary"
fill={false}
iconSide="left"

View file

@ -11,6 +11,7 @@ import { MANAGE_SPACES_URL } from '../lib/constants';
interface Props {
isDisabled?: boolean;
className?: string;
size?: 's' | 'l';
style?: CSSProperties;
userProfile: UserProfile;
@ -26,7 +27,7 @@ export class ManageSpacesButton extends Component<Props, {}> {
return (
<EuiButton
size={this.props.size || 's'}
className="manage-spaces-button"
className={this.props.className}
isDisabled={this.props.isDisabled}
onClick={this.navigateToManageSpaces}
style={this.props.style}

View file

@ -7,7 +7,11 @@
overflow-y: auto;
}
.spcMenu__searchFieldWrapper,
.spcMenu__manageButtonWrapper {
.spcMenu__searchFieldWrapper {
padding: $euiSizeM;
}
.spcMenu__manageButton {
margin: $euiSizeM;
width: calc(100% - #{$euiSizeM*2});
}

View file

@ -134,14 +134,13 @@ export class SpacesMenu extends Component<Props, State> {
private renderManageButton = () => {
return (
<div key="manageSpacesButton" className="spcMenu__manageButtonWrapper">
<ManageSpacesButton
size="s"
style={{ width: `100%` }}
userProfile={this.props.userProfile}
onClick={this.props.onManageSpacesClick}
/>
</div>
<ManageSpacesButton
key="manageSpacesButton"
className="spcMenu__manageButton"
size="s"
userProfile={this.props.userProfile}
onClick={this.props.onManageSpacesClick}
/>
);
};