mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 19:19:26 +08:00
adjust demos
This commit is contained in:
parent
0f2be7308b
commit
78e8ab55b5
@ -48,45 +48,6 @@ const DescriptionItem = ({ title, content }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
class MiniDrawer extends React.Component {
|
|
||||||
state = { visible: false };
|
|
||||||
showDrawer = () => {
|
|
||||||
this.setState({
|
|
||||||
visible: true,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
onClose = () => {
|
|
||||||
this.setState({
|
|
||||||
visible: false,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<a onClick={this.showDrawer}>View Profile</a>
|
|
||||||
<Drawer
|
|
||||||
width={640}
|
|
||||||
placement="right"
|
|
||||||
closable={false}
|
|
||||||
onClose={this.onClose}
|
|
||||||
visible={this.state.visible}
|
|
||||||
>
|
|
||||||
<p style={{ ...pStyle, marginBottom: 24 }}>User Profile</p>
|
|
||||||
<p style={pStyle}>Personal</p>
|
|
||||||
<Row>
|
|
||||||
<Col span={12}>
|
|
||||||
<DescriptionItem title="Full Name" content="Lily" />{' '}
|
|
||||||
</Col>
|
|
||||||
<Col span={12}>
|
|
||||||
<DescriptionItem title="Account" content="AntDesign@example.com" />
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
</Drawer>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class App extends React.Component {
|
class App extends React.Component {
|
||||||
state = { visible: false };
|
state = { visible: false };
|
||||||
toogerHotjar = () => {
|
toogerHotjar = () => {
|
||||||
@ -147,7 +108,6 @@ class App extends React.Component {
|
|||||||
>
|
>
|
||||||
<p style={{ ...pStyle, marginBottom: 24 }}>User Profile</p>
|
<p style={{ ...pStyle, marginBottom: 24 }}>User Profile</p>
|
||||||
<p style={pStyle}>Personal</p>
|
<p style={pStyle}>Personal</p>
|
||||||
<MiniDrawer />
|
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<DescriptionItem title="Full Name" content="Lily" />{' '}
|
<DescriptionItem title="Full Name" content="Lily" />{' '}
|
||||||
|
Loading…
Reference in New Issue
Block a user