🎬 update drawer demo (#20988)

This commit is contained in:
偏右 2020-01-17 23:32:56 +08:00 committed by GitHub
parent 219cae3355
commit 9c41d4c3b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 42 deletions

View File

@ -52,7 +52,12 @@ class DrawerForm extends React.Component {
textAlign: 'right',
}}
>
<Button onClick={this.onClose}>Cancel</Button>
<Button
onClick={this.onClose}
style={{ marginRight: 8 }}
>
Cancel
</Button>
<Button onClick={this.onClose} type="primary">
Submit
</Button>

View File

@ -55,18 +55,6 @@ class App extends React.Component {
closable={false}
onClose={this.onClose}
visible={this.state.visible}
footer={
<div
style={{
textAlign: 'right',
}}
>
<Button onClick={this.onClose}>Cancel</Button>
<Button onClick={this.onClose} type="primary">
Submit
</Button>
</div>
}
>
<Button type="primary" onClick={this.showChildrenDrawer}>
Two-level drawer
@ -89,35 +77,6 @@ class App extends React.Component {
ReactDOM.render(<App />, mountNode);
```
```css
.site-multi-level-drawer-footer {
position: absolute;
bottom: 0;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
border-radius: 0 0 4px 4px;
background: #fff;
}
.site-multi-level-drawer-footer button:first-child {
margin-right: 8px;
}
[class*='-drawer-rtl'] .site-multi-level-drawer-footer {
text-align: left;
right: 0;
left: auto;
}
[class*='-drawer-rtl'] .site-multi-level-drawer-footer button:first-child {
margin-right: 0;
margin-left: 8px;
}
```
<style>
[data-theme="dark"] .site-multi-level-drawer-footer {
border-top: 1px solid #303030;