|
@@ -249,14 +249,22 @@ stories.add(
|
249
|
249
|
stories.add(
|
250
|
250
|
"WantedPublishPopover And Modal",
|
251
|
251
|
() => {
|
252
|
|
- const [wanted, setWanted] = React.useState("");
|
|
252
|
+ const [modalwanted, setModalWanted] = React.useState("");
|
|
253
|
+ const [popwanted, setPopWanted] = React.useState("");
|
253
|
254
|
return (
|
254
|
255
|
<div>
|
255
|
256
|
<div>
|
256
|
|
- <WantedPublishModal>
|
|
257
|
+ <WantedPublishModal
|
|
258
|
+ handleConfirm={(value: any) => {
|
|
259
|
+ setModalWanted(value);
|
|
260
|
+ }}
|
|
261
|
+ >
|
257
|
262
|
<div>ModalClick</div>
|
258
|
263
|
</WantedPublishModal>
|
259
|
264
|
</div>
|
|
265
|
+ {(wanted => (
|
|
266
|
+ <div>modal wanted: {wanted}</div>
|
|
267
|
+ ))(modalwanted)}
|
260
|
268
|
<Divider />
|
261
|
269
|
<div>
|
262
|
270
|
<WantedPublishPopover
|
|
@@ -293,17 +301,17 @@ stories.add(
|
293
|
301
|
)
|
294
|
302
|
}}
|
295
|
303
|
handleConfirm={(value: any) => {
|
296
|
|
- setWanted(value);
|
|
304
|
+ setPopWanted(value);
|
297
|
305
|
}}
|
298
|
306
|
>
|
299
|
|
- <Button>HoverIt{wanted}</Button>
|
|
307
|
+ <Button>HoverIt{popwanted}</Button>
|
300
|
308
|
</WantedPublishPopover>
|
301
|
309
|
</div>
|
302
|
|
- <Divider />
|
303
|
310
|
{/* 下面用于分割wanted值的渲染,防止Error */}
|
304
|
311
|
{(wanted => (
|
305
|
|
- <div>wanted{wanted}</div>
|
306
|
|
- ))(wanted)}
|
|
312
|
+ <div>popover wanted: {wanted}</div>
|
|
313
|
+ ))(popwanted)}
|
|
314
|
+ <Divider />
|
307
|
315
|
</div>
|
308
|
316
|
);
|
309
|
317
|
},
|