Fix ModalTriggers styling in SqlLab (#11719)

This commit is contained in:
Kamil Gabryjelski 2020-11-17 02:13:37 +01:00 committed by GitHub
parent 7bc353f8a8
commit 274420bc5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -53,6 +53,14 @@ export const MenuItem = styled(AntdMenu.Item)`
height: ${({ theme }) => theme.gridUnit * 7}px;
line-height: ${({ theme }) => theme.gridUnit * 7}px;
}
&.ant-menu-item,
&.ant-dropdown-menu-item {
span[role='button'] {
display: inline-block;
width: 100%;
}
}
`;
export const Menu = Object.assign(AntdMenu, {

View File

@ -102,9 +102,9 @@ export default class ModalTrigger extends React.Component {
/* eslint-disable jsx-a11y/interactive-supports-focus */
return (
<>
<div onClick={this.open} role="button">
<span onClick={this.open} role="button">
{this.props.triggerNode}
</div>
</span>
{this.renderModal()}
</>
);