docs: reduce demo pageheader/pagination/steps (#25483)

This commit is contained in:
xrkffgg 2020-07-07 21:33:07 +08:00 committed by GitHub
parent eb63231ab4
commit 6f8e21b75f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 621 additions and 625 deletions

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/page-header/demo/actions.md correctly 1`] = `
<div>
Array [
<div
class="ant-page-header site-page-header ant-page-header-ghost"
>
@ -186,8 +186,8 @@ exports[`renders ./components/page-header/demo/actions.md correctly 1`] = `
</div>
</div>
</div>
</div>
<br />
</div>,
<br />,
<div
class="ant-page-header ant-page-header-ghost"
>
@ -371,8 +371,8 @@ exports[`renders ./components/page-header/demo/actions.md correctly 1`] = `
</div>
</div>
</div>
</div>
</div>
</div>,
]
`;
exports[`renders ./components/page-header/demo/basic.md correctly 1`] = `
@ -915,35 +915,330 @@ exports[`renders ./components/page-header/demo/ghost.md correctly 1`] = `
`;
exports[`renders ./components/page-header/demo/responsive.md correctly 1`] = `
<div>
<div
class="ant-page-header site-page-header-responsive has-footer ant-page-header-ghost"
>
<div
class="ant-page-header site-page-header-responsive has-footer ant-page-header-ghost"
class="ant-page-header-heading"
>
<div
class="ant-page-header-heading"
class="ant-page-header-heading-left"
>
<div
class="ant-page-header-heading-left"
class="ant-page-header-back"
>
<div
class="ant-page-header-back"
aria-label="Back"
class="ant-page-header-back-button"
role="button"
style="border:0;background:transparent;padding:0;line-height:inherit;display:inline-block"
tabindex="0"
>
<span
aria-label="arrow-left"
class="anticon anticon-arrow-left"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="arrow-left"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</div>
</div>
<span
class="ant-page-header-heading-title"
title="Title"
>
Title
</span>
<span
class="ant-page-header-heading-sub-title"
title="This is a subtitle"
>
This is a subtitle
</span>
</div>
<span
class="ant-page-header-heading-extra"
>
<button
class="ant-btn"
type="button"
>
<span>
Operation
</span>
</button>
<button
class="ant-btn"
type="button"
>
<span>
Operation
</span>
</button>
<button
class="ant-btn ant-btn-primary"
type="button"
>
<span>
Primary
</span>
</button>
</span>
</div>
<div
class="ant-page-header-content"
>
<div
class="content"
>
<div
class="main"
>
<div
class="ant-descriptions ant-descriptions-small"
>
<div
aria-label="Back"
class="ant-page-header-back-button"
role="button"
style="border:0;background:transparent;padding:0;line-height:inherit;display:inline-block"
tabindex="0"
class="ant-descriptions-view"
>
<table>
<tbody>
<tr
class="ant-descriptions-row"
>
<td
class="ant-descriptions-item"
colspan="1"
>
<span
class="ant-descriptions-item-label"
>
Created
</span>
<span
class="ant-descriptions-item-content"
>
Lili Qu
</span>
</td>
<td
class="ant-descriptions-item"
colspan="1"
>
<span
class="ant-descriptions-item-label"
>
Association
</span>
<span
class="ant-descriptions-item-content"
>
<a>
421421
</a>
</span>
</td>
</tr>
<tr
class="ant-descriptions-row"
>
<td
class="ant-descriptions-item"
colspan="1"
>
<span
class="ant-descriptions-item-label"
>
Creation Time
</span>
<span
class="ant-descriptions-item-content"
>
2017-01-10
</span>
</td>
<td
class="ant-descriptions-item"
colspan="1"
>
<span
class="ant-descriptions-item-label"
>
Effective Time
</span>
<span
class="ant-descriptions-item-content"
>
2017-10-10
</span>
</td>
</tr>
<tr
class="ant-descriptions-row"
>
<td
class="ant-descriptions-item"
colspan="2"
>
<span
class="ant-descriptions-item-label"
>
Remarks
</span>
<span
class="ant-descriptions-item-content"
>
Gonghu Road, Xihu District, Hangzhou, Zhejiang, China
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div
class="extra"
>
<div
style="display:flex;width:max-content;justify-content:flex-end"
>
<div
class="ant-statistic"
style="margin-right:32px"
>
<div
class="ant-statistic-title"
>
Status
</div>
<div
class="ant-statistic-content"
>
<span
class="ant-statistic-content-value"
>
Pending
</span>
</div>
</div>
<div
class="ant-statistic"
>
<div
class="ant-statistic-title"
>
Price
</div>
<div
class="ant-statistic-content"
>
<span
class="ant-statistic-content-prefix"
>
$
</span>
<span
class="ant-statistic-content-value"
>
<span
class="ant-statistic-content-value-int"
>
568
</span>
<span
class="ant-statistic-content-value-decimal"
>
.08
</span>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="ant-page-header-footer"
>
<div
class="ant-tabs ant-tabs-top"
>
<div
class="ant-tabs-nav"
role="tablist"
>
<div
class="ant-tabs-nav-wrap"
>
<div
class="ant-tabs-nav-list"
style="transform:translate(0px, 0px)"
>
<div
class="ant-tabs-tab ant-tabs-tab-active"
>
<div
aria-selected="true"
class="ant-tabs-tab-btn"
role="tab"
tabindex="0"
>
Details
</div>
</div>
<div
class="ant-tabs-tab"
>
<div
aria-selected="false"
class="ant-tabs-tab-btn"
role="tab"
tabindex="0"
>
Rule
</div>
</div>
<div
class="ant-tabs-ink-bar ant-tabs-ink-bar-animated"
/>
</div>
</div>
<div
class="ant-tabs-nav-operations ant-tabs-nav-operations-hidden"
>
<button
aria-controls="null-more-popup"
aria-expanded="false"
aria-haspopup="listbox"
aria-hidden="true"
class="ant-tabs-nav-more"
id="null-more"
style="visibility:hidden;order:1"
tabindex="-1"
type="button"
>
<span
aria-label="arrow-left"
class="anticon anticon-arrow-left"
aria-label="ellipsis"
class="anticon anticon-ellipsis"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="arrow-left"
data-icon="ellipsis"
fill="currentColor"
focusable="false"
height="1em"
@ -951,329 +1246,32 @@ exports[`renders ./components/page-header/demo/responsive.md correctly 1`] = `
width="1em"
>
<path
d="M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"
d="M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"
/>
</svg>
</span>
</div>
</div>
<span
class="ant-page-header-heading-title"
title="Title"
>
Title
</span>
<span
class="ant-page-header-heading-sub-title"
title="This is a subtitle"
>
This is a subtitle
</span>
</div>
<span
class="ant-page-header-heading-extra"
>
<button
class="ant-btn"
type="button"
>
<span>
Operation
</span>
</button>
<button
class="ant-btn"
type="button"
>
<span>
Operation
</span>
</button>
<button
class="ant-btn ant-btn-primary"
type="button"
>
<span>
Primary
</span>
</button>
</span>
</div>
<div
class="ant-page-header-content"
>
<div
class="content"
>
<div
class="main"
>
<div
class="ant-descriptions ant-descriptions-small"
>
<div
class="ant-descriptions-view"
>
<table>
<tbody>
<tr
class="ant-descriptions-row"
>
<td
class="ant-descriptions-item"
colspan="1"
>
<span
class="ant-descriptions-item-label"
>
Created
</span>
<span
class="ant-descriptions-item-content"
>
Lili Qu
</span>
</td>
<td
class="ant-descriptions-item"
colspan="1"
>
<span
class="ant-descriptions-item-label"
>
Association
</span>
<span
class="ant-descriptions-item-content"
>
<a>
421421
</a>
</span>
</td>
</tr>
<tr
class="ant-descriptions-row"
>
<td
class="ant-descriptions-item"
colspan="1"
>
<span
class="ant-descriptions-item-label"
>
Creation Time
</span>
<span
class="ant-descriptions-item-content"
>
2017-01-10
</span>
</td>
<td
class="ant-descriptions-item"
colspan="1"
>
<span
class="ant-descriptions-item-label"
>
Effective Time
</span>
<span
class="ant-descriptions-item-content"
>
2017-10-10
</span>
</td>
</tr>
<tr
class="ant-descriptions-row"
>
<td
class="ant-descriptions-item"
colspan="2"
>
<span
class="ant-descriptions-item-label"
>
Remarks
</span>
<span
class="ant-descriptions-item-content"
>
Gonghu Road, Xihu District, Hangzhou, Zhejiang, China
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div
class="extra"
>
<div
style="display:flex;width:max-content;justify-content:flex-end"
>
<div
class="ant-statistic"
style="margin-right:32px"
>
<div
class="ant-statistic-title"
>
Status
</div>
<div
class="ant-statistic-content"
>
<span
class="ant-statistic-content-value"
>
Pending
</span>
</div>
</div>
<div
class="ant-statistic"
>
<div
class="ant-statistic-title"
>
Price
</div>
<div
class="ant-statistic-content"
>
<span
class="ant-statistic-content-prefix"
>
$
</span>
<span
class="ant-statistic-content-value"
>
<span
class="ant-statistic-content-value-int"
>
568
</span>
<span
class="ant-statistic-content-value-decimal"
>
.08
</span>
</span>
</div>
</div>
</div>
</button>
</div>
</div>
</div>
<div
class="ant-page-header-footer"
>
<div
class="ant-tabs ant-tabs-top"
class="ant-tabs-content-holder"
>
<div
class="ant-tabs-nav"
role="tablist"
class="ant-tabs-content ant-tabs-content-top"
>
<div
class="ant-tabs-nav-wrap"
>
<div
class="ant-tabs-nav-list"
style="transform:translate(0px, 0px)"
>
<div
class="ant-tabs-tab ant-tabs-tab-active"
>
<div
aria-selected="true"
class="ant-tabs-tab-btn"
role="tab"
tabindex="0"
>
Details
</div>
</div>
<div
class="ant-tabs-tab"
>
<div
aria-selected="false"
class="ant-tabs-tab-btn"
role="tab"
tabindex="0"
>
Rule
</div>
</div>
<div
class="ant-tabs-ink-bar ant-tabs-ink-bar-animated"
/>
</div>
</div>
aria-hidden="false"
class="ant-tabs-tabpane ant-tabs-tabpane-active"
role="tabpanel"
tabindex="0"
/>
<div
class="ant-tabs-nav-operations ant-tabs-nav-operations-hidden"
>
<button
aria-controls="null-more-popup"
aria-expanded="false"
aria-haspopup="listbox"
aria-hidden="true"
class="ant-tabs-nav-more"
id="null-more"
style="visibility:hidden;order:1"
tabindex="-1"
type="button"
>
<span
aria-label="ellipsis"
class="anticon anticon-ellipsis"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="ellipsis"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"
/>
</svg>
</span>
</button>
</div>
</div>
<div
class="ant-tabs-content-holder"
>
<div
class="ant-tabs-content ant-tabs-content-top"
>
<div
aria-hidden="false"
class="ant-tabs-tabpane ant-tabs-tabpane-active"
role="tabpanel"
tabindex="0"
/>
<div
aria-hidden="true"
class="ant-tabs-tabpane"
role="tabpanel"
style="visibility:hidden;height:0;overflow-y:hidden"
tabindex="-1"
/>
</div>
aria-hidden="true"
class="ant-tabs-tabpane"
role="tabpanel"
style="visibility:hidden;height:0;overflow-y:hidden"
tabindex="-1"
/>
</div>
</div>
</div>

View File

@ -17,7 +17,7 @@ Use the operating area and customize the sub-nodes, suitable for use in the need
import { PageHeader, Tag, Button, Statistic, Descriptions, Row } from 'antd';
ReactDOM.render(
<div>
<>
<PageHeader
className="site-page-header"
onBack={() => window.history.back()}
@ -70,7 +70,7 @@ ReactDOM.render(
<Statistic title="Balance" prefix="$" value={3345.08} />
</Row>
</PageHeader>
</div>,
</>,
mountNode,
);
```

View File

@ -62,7 +62,7 @@ const Content = ({ children, extra }) => {
};
ReactDOM.render(
<div>
<>
<PageHeader
className="site-page-header-responsive"
onBack={() => window.history.back()}
@ -84,7 +84,7 @@ ReactDOM.render(
>
<Content extra={extraContent}>{renderContent()}</Content>
</PageHeader>
</div>,
</>,
mountNode,
);
```

View File

@ -1,249 +1,247 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/pagination/demo/all.md correctly 1`] = `
<div>
<ul
class="ant-pagination"
unselectable="unselectable"
<ul
class="ant-pagination"
unselectable="unselectable"
>
<li
class="ant-pagination-total-text"
>
<li
class="ant-pagination-total-text"
Total 85 items
</li>
<li
aria-disabled="true"
class="ant-pagination-prev ant-pagination-disabled"
title="Previous Page"
>
<button
class="ant-pagination-item-link"
disabled=""
tabindex="-1"
type="button"
>
Total 85 items
</li>
<li
aria-disabled="true"
class="ant-pagination-prev ant-pagination-disabled"
title="Previous Page"
>
<button
class="ant-pagination-item-link"
disabled=""
tabindex="-1"
type="button"
<span
aria-label="left"
class="anticon anticon-left"
role="img"
>
<span
aria-label="left"
class="anticon anticon-left"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="left"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"
/>
</svg>
</span>
</button>
</li>
<li
class="ant-pagination-item ant-pagination-item-1 ant-pagination-item-active"
tabindex="0"
title="1"
>
<a>
1
</a>
</li>
<li
class="ant-pagination-item ant-pagination-item-2"
tabindex="0"
title="2"
>
<a>
2
</a>
</li>
<li
class="ant-pagination-item ant-pagination-item-3"
tabindex="0"
title="3"
>
<a>
3
</a>
</li>
<li
class="ant-pagination-item ant-pagination-item-4"
tabindex="0"
title="4"
>
<a>
4
</a>
</li>
<li
class="ant-pagination-item ant-pagination-item-5 ant-pagination-item-before-jump-next"
tabindex="0"
title="5"
>
<a>
5
</a>
</li>
<li
class="ant-pagination-jump-next ant-pagination-jump-next-custom-icon"
tabindex="0"
title="Next 5 Pages"
>
<a
class="ant-pagination-item-link"
>
<div
class="ant-pagination-item-container"
>
<span
aria-label="double-right"
class="anticon anticon-double-right ant-pagination-item-link-icon"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="double-right"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"
/>
</svg>
</span>
<span
class="ant-pagination-item-ellipsis"
>
•••
</span>
</div>
</a>
</li>
<li
class="ant-pagination-item ant-pagination-item-9"
tabindex="0"
title="9"
>
<a>
9
</a>
</li>
<li
aria-disabled="false"
class="ant-pagination-next"
tabindex="0"
title="Next Page"
>
<button
class="ant-pagination-item-link"
tabindex="-1"
type="button"
>
<span
aria-label="right"
class="anticon anticon-right"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="right"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"
/>
</svg>
</span>
</button>
</li>
<li
class="ant-pagination-options"
>
<div
class="ant-select ant-pagination-options-size-changer ant-select-single ant-select-show-arrow"
>
<div
class="ant-select-selector"
>
<span
class="ant-select-selection-search"
title="10 / page"
>
<input
aria-activedescendant="undefined_list_0"
aria-autocomplete="list"
aria-controls="undefined_list"
aria-haspopup="listbox"
aria-owns="undefined_list"
autocomplete="off"
class="ant-select-selection-search-input"
readonly=""
role="combobox"
style="opacity:0"
unselectable="on"
value=""
/>
</span>
<span
class="ant-select-selection-item"
>
10 / page
</span>
</div>
<span
<svg
aria-hidden="true"
class="ant-select-arrow"
style="user-select:none;-webkit-user-select:none"
unselectable="on"
class=""
data-icon="left"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<span
aria-label="down"
class="anticon anticon-down ant-select-suffix"
role="img"
<path
d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"
/>
</svg>
</span>
</button>
</li>
<li
class="ant-pagination-item ant-pagination-item-1 ant-pagination-item-active"
tabindex="0"
title="1"
>
<a>
1
</a>
</li>
<li
class="ant-pagination-item ant-pagination-item-2"
tabindex="0"
title="2"
>
<a>
2
</a>
</li>
<li
class="ant-pagination-item ant-pagination-item-3"
tabindex="0"
title="3"
>
<a>
3
</a>
</li>
<li
class="ant-pagination-item ant-pagination-item-4"
tabindex="0"
title="4"
>
<a>
4
</a>
</li>
<li
class="ant-pagination-item ant-pagination-item-5 ant-pagination-item-before-jump-next"
tabindex="0"
title="5"
>
<a>
5
</a>
</li>
<li
class="ant-pagination-jump-next ant-pagination-jump-next-custom-icon"
tabindex="0"
title="Next 5 Pages"
>
<a
class="ant-pagination-item-link"
>
<div
class="ant-pagination-item-container"
>
<span
aria-label="double-right"
class="anticon anticon-double-right ant-pagination-item-link-icon"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="double-right"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<svg
aria-hidden="true"
class=""
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
<path
d="M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"
/>
</svg>
</span>
<span
class="ant-pagination-item-ellipsis"
>
•••
</span>
</div>
<div
class="ant-pagination-options-quick-jumper"
</a>
</li>
<li
class="ant-pagination-item ant-pagination-item-9"
tabindex="0"
title="9"
>
<a>
9
</a>
</li>
<li
aria-disabled="false"
class="ant-pagination-next"
tabindex="0"
title="Next Page"
>
<button
class="ant-pagination-item-link"
tabindex="-1"
type="button"
>
<span
aria-label="right"
class="anticon anticon-right"
role="img"
>
Go to
<input
type="text"
value=""
/>
<svg
aria-hidden="true"
class=""
data-icon="right"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"
/>
</svg>
</span>
</button>
</li>
<li
class="ant-pagination-options"
>
<div
class="ant-select ant-pagination-options-size-changer ant-select-single ant-select-show-arrow"
>
<div
class="ant-select-selector"
>
<span
class="ant-select-selection-search"
title="10 / page"
>
<input
aria-activedescendant="undefined_list_0"
aria-autocomplete="list"
aria-controls="undefined_list"
aria-haspopup="listbox"
aria-owns="undefined_list"
autocomplete="off"
class="ant-select-selection-search-input"
readonly=""
role="combobox"
style="opacity:0"
unselectable="on"
value=""
/>
</span>
<span
class="ant-select-selection-item"
>
10 / page
</span>
</div>
</li>
</ul>
</div>
<span
aria-hidden="true"
class="ant-select-arrow"
style="user-select:none;-webkit-user-select:none"
unselectable="on"
>
<span
aria-label="down"
class="anticon anticon-down ant-select-suffix"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
<div
class="ant-pagination-options-quick-jumper"
>
Go to
<input
type="text"
value=""
/>
</div>
</li>
</ul>
`;
exports[`renders ./components/pagination/demo/basic.md correctly 1`] = `
@ -366,7 +364,7 @@ exports[`renders ./components/pagination/demo/basic.md correctly 1`] = `
`;
exports[`renders ./components/pagination/demo/changer.md correctly 1`] = `
<div>
Array [
<ul
class="ant-pagination"
unselectable="unselectable"
@ -593,8 +591,8 @@ exports[`renders ./components/pagination/demo/changer.md correctly 1`] = `
</span>
</div>
</li>
</ul>
<br />
</ul>,
<br />,
<ul
class="ant-pagination ant-pagination-disabled"
unselectable="unselectable"
@ -823,8 +821,8 @@ exports[`renders ./components/pagination/demo/changer.md correctly 1`] = `
</span>
</div>
</li>
</ul>
</div>
</ul>,
]
`;
exports[`renders ./components/pagination/demo/controlled.md correctly 1`] = `
@ -1132,7 +1130,7 @@ exports[`renders ./components/pagination/demo/itemRender.md correctly 1`] = `
`;
exports[`renders ./components/pagination/demo/jump.md correctly 1`] = `
<div>
Array [
<ul
class="ant-pagination"
unselectable="unselectable"
@ -1368,8 +1366,8 @@ exports[`renders ./components/pagination/demo/jump.md correctly 1`] = `
/>
</div>
</li>
</ul>
<br />
</ul>,
<br />,
<ul
class="ant-pagination ant-pagination-disabled"
unselectable="unselectable"
@ -1608,12 +1606,12 @@ exports[`renders ./components/pagination/demo/jump.md correctly 1`] = `
/>
</div>
</li>
</ul>
</div>
</ul>,
]
`;
exports[`renders ./components/pagination/demo/mini.md correctly 1`] = `
<div>
Array [
<ul
class="ant-pagination mini"
unselectable="unselectable"
@ -1729,7 +1727,7 @@ exports[`renders ./components/pagination/demo/mini.md correctly 1`] = `
</span>
</button>
</li>
</ul>
</ul>,
<ul
class="ant-pagination mini"
unselectable="unselectable"
@ -1917,7 +1915,7 @@ exports[`renders ./components/pagination/demo/mini.md correctly 1`] = `
/>
</div>
</li>
</ul>
</ul>,
<ul
class="ant-pagination mini"
unselectable="unselectable"
@ -2038,8 +2036,8 @@ exports[`renders ./components/pagination/demo/mini.md correctly 1`] = `
</span>
</button>
</li>
</ul>
</div>
</ul>,
]
`;
exports[`renders ./components/pagination/demo/more.md correctly 1`] = `
@ -2410,7 +2408,7 @@ exports[`renders ./components/pagination/demo/simple.md correctly 1`] = `
`;
exports[`renders ./components/pagination/demo/total.md correctly 1`] = `
<div>
Array [
<ul
class="ant-pagination"
unselectable="unselectable"
@ -2594,8 +2592,8 @@ exports[`renders ./components/pagination/demo/total.md correctly 1`] = `
</span>
</div>
</li>
</ul>
<br />
</ul>,
<br />,
<ul
class="ant-pagination"
unselectable="unselectable"
@ -2779,6 +2777,6 @@ exports[`renders ./components/pagination/demo/total.md correctly 1`] = `
</span>
</div>
</li>
</ul>
</div>
</ul>,
]
`;

View File

@ -17,14 +17,14 @@ Show all configured prop.
import { Pagination } from 'antd';
ReactDOM.render(
<div>
<>
<Pagination
total={85}
showSizeChanger
showQuickJumper
showTotal={total => `Total ${total} items`}
/>
</div>,
</>,
mountNode,
);
```

View File

@ -21,7 +21,7 @@ function onShowSizeChange(current, pageSize) {
}
ReactDOM.render(
<div>
<>
<Pagination
showSizeChanger
onShowSizeChange={onShowSizeChange}
@ -36,7 +36,7 @@ ReactDOM.render(
total={500}
disabled
/>
</div>,
</>,
mountNode,
);
```

View File

@ -21,11 +21,11 @@ function onChange(pageNumber) {
}
ReactDOM.render(
<div>
<>
<Pagination showQuickJumper defaultCurrent={2} total={500} onChange={onChange} />
<br />
<Pagination showQuickJumper defaultCurrent={2} total={500} onChange={onChange} disabled />
</div>,
</>,
mountNode,
);
```

View File

@ -21,11 +21,11 @@ function showTotal(total) {
}
ReactDOM.render(
<div>
<>
<Pagination size="small" total={50} />
<Pagination size="small" total={50} showSizeChanger showQuickJumper />
<Pagination size="small" total={50} showTotal={showTotal} />
</div>,
</>,
mountNode,
);
```

View File

@ -17,7 +17,7 @@ You can show the total number of data by setting `showTotal`.
import { Pagination } from 'antd';
ReactDOM.render(
<div>
<>
<Pagination
total={85}
showTotal={total => `Total ${total} items`}
@ -31,7 +31,7 @@ ReactDOM.render(
defaultPageSize={20}
defaultCurrent={1}
/>
</div>,
</>,
mountNode,
);
```

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/steps/demo/clickable.md correctly 1`] = `
<div>
Array [
<div
class="ant-steps ant-steps-horizontal ant-steps-label-horizontal"
>
@ -113,11 +113,11 @@ exports[`renders ./components/steps/demo/clickable.md correctly 1`] = `
</div>
</div>
</div>
</div>
</div>,
<div
class="ant-divider ant-divider-horizontal"
role="separator"
/>
/>,
<div
class="ant-steps ant-steps-vertical"
>
@ -229,8 +229,8 @@ exports[`renders ./components/steps/demo/clickable.md correctly 1`] = `
</div>
</div>
</div>
</div>
</div>
</div>,
]
`;
exports[`renders ./components/steps/demo/customized-progress-dot.md correctly 1`] = `
@ -731,7 +731,7 @@ exports[`renders ./components/steps/demo/icon.md correctly 1`] = `
`;
exports[`renders ./components/steps/demo/nav.md correctly 1`] = `
<div>
Array [
<div
class="ant-steps ant-steps-horizontal site-navigation-steps ant-steps-small ant-steps-label-horizontal ant-steps-navigation"
>
@ -880,7 +880,7 @@ exports[`renders ./components/steps/demo/nav.md correctly 1`] = `
</div>
</div>
</div>
</div>
</div>,
<div
class="ant-steps ant-steps-horizontal site-navigation-steps ant-steps-label-horizontal ant-steps-navigation"
>
@ -1027,7 +1027,7 @@ exports[`renders ./components/steps/demo/nav.md correctly 1`] = `
</div>
</div>
</div>
</div>
</div>,
<div
class="ant-steps ant-steps-horizontal site-navigation-steps ant-steps-small ant-steps-label-horizontal ant-steps-navigation"
>
@ -1191,12 +1191,12 @@ exports[`renders ./components/steps/demo/nav.md correctly 1`] = `
</div>
</div>
</div>
</div>
</div>
</div>,
]
`;
exports[`renders ./components/steps/demo/progress-dot.md correctly 1`] = `
<div>
Array [
<div
class="ant-steps ant-steps-horizontal ant-steps-label-vertical ant-steps-dot"
>
@ -1308,11 +1308,11 @@ exports[`renders ./components/steps/demo/progress-dot.md correctly 1`] = `
</div>
</div>
</div>
</div>
</div>,
<div
class="ant-divider ant-divider-horizontal"
role="separator"
/>
/>,
<div
class="ant-steps ant-steps-vertical ant-steps-dot"
>
@ -1496,8 +1496,8 @@ exports[`renders ./components/steps/demo/progress-dot.md correctly 1`] = `
</div>
</div>
</div>
</div>
</div>
</div>,
]
`;
exports[`renders ./components/steps/demo/simple.md correctly 1`] = `
@ -1748,7 +1748,7 @@ exports[`renders ./components/steps/demo/small-size.md correctly 1`] = `
`;
exports[`renders ./components/steps/demo/step-next.md correctly 1`] = `
<div>
Array [
<div
class="ant-steps ant-steps-horizontal ant-steps-label-horizontal"
>
@ -1839,12 +1839,12 @@ exports[`renders ./components/steps/demo/step-next.md correctly 1`] = `
</div>
</div>
</div>
</div>
</div>,
<div
class="steps-content"
>
First-content
</div>
</div>,
<div
class="steps-action"
>
@ -1856,8 +1856,8 @@ exports[`renders ./components/steps/demo/step-next.md correctly 1`] = `
Next
</span>
</button>
</div>
</div>
</div>,
]
`;
exports[`renders ./components/steps/demo/vertical.md correctly 1`] = `

View File

@ -32,7 +32,7 @@ class Demo extends React.Component {
const { current } = this.state;
return (
<div>
<>
<Steps current={current} onChange={this.onChange}>
<Step title="Step 1" description="This is a description." />
<Step title="Step 2" description="This is a description." />
@ -46,7 +46,7 @@ class Demo extends React.Component {
<Step title="Step 2" description="This is a description." />
<Step title="Step 3" description="This is a description." />
</Steps>
</div>
</>
);
}
}

View File

@ -31,7 +31,7 @@ class Demo extends React.Component {
render() {
const { current } = this.state;
return (
<div>
<>
<Steps
type="navigation"
size="small"
@ -81,7 +81,7 @@ class Demo extends React.Component {
<Step status="process" title="current process" />
<Step status="wait" title="wait" disabled />
</Steps>
</div>
</>
);
}
}

View File

@ -19,7 +19,7 @@ import { Steps, Divider } from 'antd';
const { Step } = Steps;
ReactDOM.render(
<div>
<>
<Steps progressDot current={1}>
<Step title="Finished" description="This is a description." />
<Step title="In Progress" description="This is a description." />
@ -33,7 +33,7 @@ ReactDOM.render(
<Step title="Waiting" description="This is a description." />
<Step title="Waiting" description="This is a description." />
</Steps>
</div>,
</>,
mountNode,
);
```

View File

@ -54,7 +54,7 @@ class App extends React.Component {
render() {
const { current } = this.state;
return (
<div>
<>
<Steps current={current}>
{steps.map(item => (
<Step key={item.title} title={item.title} />
@ -78,7 +78,7 @@ class App extends React.Component {
</Button>
)}
</div>
</div>
</>
);
}
}