Skip to content

Commit

Permalink
💄 优化调整连接按钮和主题切换按钮在拖拽改变大小时的布局样式
Browse files Browse the repository at this point in the history
  • Loading branch information
hczs committed Oct 11, 2023
1 parent 5e4d09e commit 22ace21
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
10 changes: 8 additions & 2 deletions src/components/side/side.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@
width: 100%;
}

.icon-btn {
float: right;
margin: 0 0 0 10px;
}

.conn-btn {
width: 100%;
}

.row-container {
margin: 0 0 0 -10px
margin: 0 0 0 -10px;
display: flex;
}

.light-conn-row {
Expand All @@ -27,4 +33,4 @@
.dark-conn-row {
//background-color: #11ea40 !important;
color: #34c3ff;
}
}
37 changes: 17 additions & 20 deletions src/components/side/side.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,25 +154,22 @@ const Side = () => {
<div className='side-container'>

<div className='connect-container'>
<Grid fluid>
<Row className='row-container'>
<Col xs={20}>
<Button className='conn-btn' appearance="primary" block
onClick={handleOpen}>新建连接</Button>
</Col>
<Col xs={4}>
<IconButton
icon={
<Icon
as={context.theme === 'light' ? MdOutlineNightlight : MdOutlineLightMode}
/>
}
onClick={changeTheme}
/>
</Col>
</Row>
</Grid>

<div className='row-container'>
<div className='conn-btn'>
<Button appearance="primary" block
onClick={handleOpen}>新建连接</Button>
</div>
<div className={"icon-btn"}>
<IconButton
icon={
<Icon
as={context.theme === 'light' ? MdOutlineNightlight : MdOutlineLightMode}
/>
}
onClick={changeTheme}
/>
</div>
</div>
</div>
<div className='cluster-list'>
<Table
Expand All @@ -189,7 +186,7 @@ const Side = () => {
}}
>

<Column align="center" flexGrow={1}>
<Column align="left" flexGrow={1}>
<HeaderCell>clusterName</HeaderCell>
<Cell dataKey="clusterName"/>
</Column>
Expand Down

0 comments on commit 22ace21

Please sign in to comment.