mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 13:09:40 +08:00
updat demo
This commit is contained in:
parent
7e48360c85
commit
82c4b52496
@ -477,6 +477,7 @@ exports[`renders ./components/collapse/demo/extra.md correctly 1`] = `
|
||||
<i
|
||||
aria-label="icon: setting"
|
||||
class="anticon anticon-setting"
|
||||
tabindex="-1"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -544,6 +545,7 @@ exports[`renders ./components/collapse/demo/extra.md correctly 1`] = `
|
||||
<i
|
||||
aria-label="icon: setting"
|
||||
class="anticon anticon-setting"
|
||||
tabindex="-1"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
@ -596,6 +598,7 @@ exports[`renders ./components/collapse/demo/extra.md correctly 1`] = `
|
||||
<i
|
||||
aria-label="icon: setting"
|
||||
class="anticon anticon-setting"
|
||||
tabindex="-1"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
|
@ -28,15 +28,24 @@ const text = `
|
||||
it can be found as a welcome guest in many households across the world.
|
||||
`;
|
||||
|
||||
const genExtra = () => (
|
||||
<Icon
|
||||
type="setting"
|
||||
onClick={(event) => {
|
||||
event.stopPropagation();
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
ReactDOM.render(
|
||||
<Collapse defaultActiveKey={['1']} onChange={callback}>
|
||||
<Panel header="This is panel header 1" key="1" extra={<Icon type="setting" />}>
|
||||
<Panel header="This is panel header 1" key="1" extra={genExtra()}>
|
||||
<div>{text}</div>
|
||||
</Panel>
|
||||
<Panel header="This is panel header 2" key="2" extra={<Icon type="setting" />}>
|
||||
<Panel header="This is panel header 2" key="2" extra={genExtra()}>
|
||||
<div>{text}</div>
|
||||
</Panel>
|
||||
<Panel header="This is panel header 3" key="3" extra={<Icon type="setting" />}>
|
||||
<Panel header="This is panel header 3" key="3" extra={genExtra()}>
|
||||
<div>{text}</div>
|
||||
</Panel>
|
||||
</Collapse>,
|
||||
|
Loading…
Reference in New Issue
Block a user