Browse Source

docs: Update Dropdown demo

pull/35178/head
zombiej 3 years ago
parent
commit
a513051761
  1. 51
      components/dropdown/__tests__/__snapshots__/demo-extend.test.ts.snap
  2. 51
      components/dropdown/__tests__/__snapshots__/demo.test.js.snap
  3. 5
      components/dropdown/demo/dropdown-button.md

51
components/dropdown/__tests__/__snapshots__/demo-extend.test.ts.snap

@ -4270,28 +4270,39 @@ exports[`renders ./components/dropdown/demo/dropdown-button.md extend context co
class="ant-btn ant-btn-default ant-dropdown-trigger"
type="button"
>
<span>
Button
</span>
<span
aria-label="down"
class="anticon anticon-down"
role="img"
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
<div
class="ant-space-item"
style="margin-right:8px"
>
Button
</div>
<div
class="ant-space-item"
>
<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
aria-label="down"
class="anticon anticon-down"
role="img"
>
<svg
aria-hidden="true"
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>
</div>
</div>
</button>
<div>
<div

51
components/dropdown/__tests__/__snapshots__/demo.test.js.snap

@ -340,28 +340,39 @@ exports[`renders ./components/dropdown/demo/dropdown-button.md correctly 1`] = `
class="ant-btn ant-btn-default ant-dropdown-trigger"
type="button"
>
<span>
Button
</span>
<span
aria-label="down"
class="anticon anticon-down"
role="img"
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
<div
class="ant-space-item"
style="margin-right:8px"
>
<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>
Button
</div>
<div
class="ant-space-item"
>
<span
aria-label="down"
class="anticon anticon-down"
role="img"
>
<svg
aria-hidden="true"
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>
</div>
</div>
</button>
</div>
</div>

5
components/dropdown/demo/dropdown-button.md

@ -74,7 +74,10 @@ export default () => (
</Dropdown.Button>
<Dropdown overlay={menu}>
<Button>
Button <DownOutlined />
<Space>
Button
<DownOutlined />
</Space>
</Button>
</Dropdown>
</Space>

Loading…
Cancel
Save