Skip to content

Commit

Permalink
update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Aug 16, 2019
1 parent 4b48d90 commit bcd8f25
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 9 deletions.
6 changes: 2 additions & 4 deletions components/page-header/demo/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ title:
Use the operating area and customize the sub-nodes, suitable for use in the need to display some complex information to help users quickly understand the information and operations of this page.

```jsx
import { PageHeader, Tabs, Divider, Button, Statistic, Descriptions } from 'antd';

const { TabPane } = Tabs;
import { PageHeader, Tag, Button, Statistic, Descriptions } from 'antd';

ReactDOM.render(
<div>
Expand Down Expand Up @@ -44,7 +42,7 @@ ReactDOM.render(
</Descriptions.item>
</Descriptions>
</PageHeader>
<Divider />
<br />
<PageHeader
onBack={() => window.history.back()}
title="Title"
Expand Down
47 changes: 43 additions & 4 deletions components/page-header/demo/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,51 @@ title:
Show all props.

```jsx
import { PageHeader, Icon, Button, Tag, Typography } from 'antd';
import { PageHeader, Menu, Dropdown, Icon, Button, Tag, Typography } from 'antd';

const { Paragraph } = Typography;

const menu = (
<Menu>
<Menu.Item>
<a target="_blank" rel="noopener noreferrer" href="http://www.alipay.com/">
1st menu item
</a>
</Menu.Item>
<Menu.Item>
<a target="_blank" rel="noopener noreferrer" href="http://www.taobao.com/">
2nd menu item
</a>
</Menu.Item>
<Menu.Item>
<a target="_blank" rel="noopener noreferrer" href="http://www.tmall.com/">
3rd menu item
</a>
</Menu.Item>
</Menu>
);

const DropdownMenu = () => {
return (
<Dropdown key="more" overlay={menu}>
<Button
style={{
border: 'none',
padding: 0,
}}
>
<Icon
type="ellipsis"
style={{
fontSize: 20,
verticalAlign: 'top',
}}
/>
</Button>
</Dropdown>
);
};

const routes = [
{
path: 'index',
Expand Down Expand Up @@ -92,9 +133,7 @@ ReactDOM.render(
<Button key="1" type="primary">
Primary
</Button>,
<Button type="link" key="more">
<Icon type="ellipsis" />
</Button>,
<DropdownMenu key="more" />,
]}
avatar={{ src: 'https://avatars1.githubusercontent.com/u/8186664?s=460&v=4' }}
extraContent={
Expand Down
2 changes: 1 addition & 1 deletion components/page-header/demo/responsive.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ title:
Under different screen sizes, there should be different performance

```jsx
import { PageHeader, Tabs, Divider, Button, Statistic, Descriptions } from 'antd';
import { PageHeader, Tabs, Button, Statistic, Descriptions } from 'antd';

const { TabPane } = Tabs;

Expand Down

0 comments on commit bcd8f25

Please sign in to comment.