mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 09:26:06 +08:00
docs(breadcrumb): add with params demo (#49902)
* docs(breadcrumb): add with params demo * test: add snap
This commit is contained in:
parent
d0389931a3
commit
ca66d5c592
@ -895,3 +895,35 @@ exports[`renders components/breadcrumb/demo/withIcon.tsx extend context correctl
|
||||
`;
|
||||
|
||||
exports[`renders components/breadcrumb/demo/withIcon.tsx extend context correctly 2`] = `[]`;
|
||||
|
||||
exports[`renders components/breadcrumb/demo/withParams.tsx extend context correctly 1`] = `
|
||||
<nav
|
||||
class="ant-breadcrumb"
|
||||
>
|
||||
<ol>
|
||||
<li>
|
||||
<span
|
||||
class="ant-breadcrumb-link"
|
||||
>
|
||||
Users
|
||||
</span>
|
||||
</li>
|
||||
<li
|
||||
aria-hidden="true"
|
||||
class="ant-breadcrumb-separator"
|
||||
>
|
||||
/
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
class="ant-breadcrumb-link"
|
||||
href=""
|
||||
>
|
||||
1
|
||||
</a>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
`;
|
||||
|
||||
exports[`renders components/breadcrumb/demo/withParams.tsx extend context correctly 2`] = `[]`;
|
||||
|
@ -553,3 +553,33 @@ exports[`renders components/breadcrumb/demo/withIcon.tsx correctly 1`] = `
|
||||
</ol>
|
||||
</nav>
|
||||
`;
|
||||
|
||||
exports[`renders components/breadcrumb/demo/withParams.tsx correctly 1`] = `
|
||||
<nav
|
||||
class="ant-breadcrumb"
|
||||
>
|
||||
<ol>
|
||||
<li>
|
||||
<span
|
||||
class="ant-breadcrumb-link"
|
||||
>
|
||||
Users
|
||||
</span>
|
||||
</li>
|
||||
<li
|
||||
aria-hidden="true"
|
||||
class="ant-breadcrumb-separator"
|
||||
>
|
||||
/
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
class="ant-breadcrumb-link"
|
||||
href=""
|
||||
>
|
||||
1
|
||||
</a>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
`;
|
||||
|
7
components/breadcrumb/demo/withParams.md
Normal file
7
components/breadcrumb/demo/withParams.md
Normal file
@ -0,0 +1,7 @@
|
||||
## zh-CN
|
||||
|
||||
带有路由参数的。
|
||||
|
||||
## en-US
|
||||
|
||||
With route params.
|
19
components/breadcrumb/demo/withParams.tsx
Normal file
19
components/breadcrumb/demo/withParams.tsx
Normal file
@ -0,0 +1,19 @@
|
||||
import React from 'react';
|
||||
import { Breadcrumb } from 'antd';
|
||||
|
||||
const App: React.FC = () => (
|
||||
<Breadcrumb
|
||||
items={[
|
||||
{
|
||||
title: 'Users',
|
||||
},
|
||||
{
|
||||
title: ':id',
|
||||
href: '',
|
||||
},
|
||||
]}
|
||||
params={{ id: 1 }}
|
||||
/>
|
||||
);
|
||||
|
||||
export default App;
|
@ -36,6 +36,7 @@ return <Breadcrumb routes={[{ breadcrumbName: 'sample' }]} />;
|
||||
<!-- prettier-ignore -->
|
||||
<code src="./demo/basic.tsx">Basic Usage</code>
|
||||
<code src="./demo/withIcon.tsx">With an Icon</code>
|
||||
<code src="./demo/withParams.tsx">With Params</code>
|
||||
<code src="./demo/separator.tsx">Configuring the Separator</code>
|
||||
<code src="./demo/overlay.tsx">Bread crumbs with drop down menu</code>
|
||||
<code src="./demo/separator-component.tsx">Configuring the Separator Independently</code>
|
||||
|
@ -37,6 +37,7 @@ return <Breadcrumb routes={[{ breadcrumbName: 'sample' }]} />;
|
||||
<!-- prettier-ignore -->
|
||||
<code src="./demo/basic.tsx">基本</code>
|
||||
<code src="./demo/withIcon.tsx">带有图标的</code>
|
||||
<code src="./demo/withParams.tsx">带有参数的</code>
|
||||
<code src="./demo/separator.tsx">分隔符</code>
|
||||
<code src="./demo/overlay.tsx">带下拉菜单的面包屑</code>
|
||||
<code src="./demo/separator-component.tsx">独立的分隔符</code>
|
||||
|
Loading…
Reference in New Issue
Block a user