Fix topbar responsiveness
This commit is contained in:
parent
c512a04623
commit
45fb51bca9
|
@ -36,6 +36,8 @@ import {
|
||||||
LinkOutlined,
|
LinkOutlined,
|
||||||
DownOutlined,
|
DownOutlined,
|
||||||
SearchOutlined,
|
SearchOutlined,
|
||||||
|
ToolOutlined,
|
||||||
|
FundOutlined,
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import {
|
import {
|
||||||
useEffect,
|
useEffect,
|
||||||
|
@ -137,8 +139,8 @@ const TopBar = () => {
|
||||||
return (
|
return (
|
||||||
<Header className="app-top-bar">
|
<Header className="app-top-bar">
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={0} md={8} sm={0} />
|
<Col span={0} md={6} sm={0} />
|
||||||
<Col span={12} md={8} sm={16} style={{ textAlign: 'center' }}>
|
<Col span={12} md={10} sm={16} style={{ textAlign: 'center' }}>
|
||||||
<Radio.Group
|
<Radio.Group
|
||||||
key={pathname}
|
key={pathname}
|
||||||
defaultValue={matchedTabPath?.url}
|
defaultValue={matchedTabPath?.url}
|
||||||
|
@ -146,9 +148,24 @@ const TopBar = () => {
|
||||||
buttonStyle="solid"
|
buttonStyle="solid"
|
||||||
onChange={(e) => history.push(e.target.value)}
|
onChange={(e) => history.push(e.target.value)}
|
||||||
>
|
>
|
||||||
<Radio.Button value={Routes.TUNE}>Tune</Radio.Button>
|
<Radio.Button value={Routes.TUNE}>
|
||||||
<Radio.Button value={Routes.LOG}>Log</Radio.Button>
|
<Space>
|
||||||
<Radio.Button value={Routes.DIAGNOSE}>Diagnose</Radio.Button>
|
<ToolOutlined />
|
||||||
|
{sm && 'Tune'}
|
||||||
|
</Space>
|
||||||
|
</Radio.Button>
|
||||||
|
<Radio.Button value={Routes.LOG}>
|
||||||
|
<Space>
|
||||||
|
<FundOutlined />
|
||||||
|
{sm && 'Log'}
|
||||||
|
</Space>
|
||||||
|
</Radio.Button>
|
||||||
|
<Radio.Button value={Routes.DIAGNOSE}>
|
||||||
|
<Space>
|
||||||
|
<SettingOutlined />
|
||||||
|
{sm && 'Diagnose'}
|
||||||
|
</Space>
|
||||||
|
</Radio.Button>
|
||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12} md={8} sm={8} style={{ textAlign: 'right' }}>
|
<Col span={12} md={8} sm={8} style={{ textAlign: 'right' }}>
|
||||||
|
@ -159,7 +176,7 @@ const TopBar = () => {
|
||||||
<Typography.Text keyboard>P</Typography.Text>
|
<Typography.Text keyboard>P</Typography.Text>
|
||||||
</>
|
</>
|
||||||
}>
|
}>
|
||||||
{sm && <Button icon={<SearchOutlined />} />}
|
<Button icon={<SearchOutlined />} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
overlay={shareMenu}
|
overlay={shareMenu}
|
||||||
|
|
Loading…
Reference in New Issue