|
@@ -4,7 +4,7 @@ import { withInfo } from "@storybook/addon-info";
|
4
|
4
|
import { addReadme } from "storybook-readme";
|
5
|
5
|
import React from "react";
|
6
|
6
|
import AllocWantedModal from "@components/Payment/AllocWantedModal";
|
7
|
|
-import { Button, Divider } from "antd";
|
|
7
|
+import { Button, Divider, Modal } from "antd";
|
8
|
8
|
import WantedPublishView from "@components/Payment/WantedPublishView";
|
9
|
9
|
import WantedPublishModal from "@components/Payment/WantedPublishModal";
|
10
|
10
|
import WantedPublishPopover from "@components/Payment/WantedPublishPopover";
|
|
@@ -88,6 +88,7 @@ stories.add(
|
88
|
88
|
"WantedPublishPopover And Modal",
|
89
|
89
|
() => {
|
90
|
90
|
const [wanted, setWanted] = React.useState("");
|
|
91
|
+ const [testModal, setTestModal] = React.useState(false);
|
91
|
92
|
return (
|
92
|
93
|
<div>
|
93
|
94
|
<div>
|
|
@@ -138,6 +139,18 @@ stories.add(
|
138
|
139
|
</WantedPublishPopover>
|
139
|
140
|
</div>
|
140
|
141
|
<Divider />
|
|
142
|
+ <div onClick={() => setTestModal(true)}>Show Modal</div>
|
|
143
|
+ <Modal
|
|
144
|
+ visible={testModal}
|
|
145
|
+ title="Create a new collection"
|
|
146
|
+ okText="Create"
|
|
147
|
+ onCancel={() => setTestModal(false)}
|
|
148
|
+ onOk={() => setTestModal(true)}
|
|
149
|
+ >
|
|
150
|
+ <WantedPublishModal>
|
|
151
|
+ <div>ModalClick</div>
|
|
152
|
+ </WantedPublishModal>
|
|
153
|
+ </Modal>
|
141
|
154
|
{/* 下面用于分割wanted值的渲染,防止Error */}
|
142
|
155
|
{(wanted => (
|
143
|
156
|
<div>wanted{wanted}</div>
|