fix: Removing specific column widths, letting things flex naturally. (#14637)

This commit is contained in:
Evan Rusackas 2021-05-14 02:12:37 -07:00 committed by GitHub
parent e4e23ea487
commit bf90885828
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,7 +158,6 @@ const SubMenuComponent: React.FunctionComponent<SubMenuProps> = props => {
const [navRightStyle, setNavRightStyle] = useState('nav-right');
const [navRightCol, setNavRightCol] = useState(8);
const { headerSize = 2 } = props;
let hasHistory = true;
// If no parent <Router> component exists, useHistory throws an error
try {
@ -195,17 +194,15 @@ const SubMenuComponent: React.FunctionComponent<SubMenuProps> = props => {
return () => window.removeEventListener('resize', resize);
}, [props.buttons]);
const offset = props.name ? headerSize : 0;
return (
<StyledHeader>
<Row className="menu" role="navigation">
{props.name && (
<Col md={offset} xs={24}>
<Col flex="none">
<div className="header">{props.name}</div>
</Col>
)}
<Col md={16 - offset} sm={24} xs={24}>
<Col flex="auto" xs={24}>
<Menu mode={showMenu} style={{ backgroundColor: 'transparent' }}>
{props.tabs &&
props.tabs.map(tab => {