mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
🎬 update drawer demo (#20988)
This commit is contained in:
parent
219cae3355
commit
9c41d4c3b6
@ -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>
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user