|
1 | 1 | /* eslint no-console:0 */
|
2 | 2 |
|
3 | 3 | import React from 'react';
|
| 4 | +import { CSSMotionProps } from 'rc-motion'; |
4 | 5 | import Trigger, { BuildInPlacements } from '../src';
|
5 | 6 | import './case.less';
|
6 |
| -import { MotionType } from '../src/interface'; |
7 | 7 |
|
8 | 8 | const builtinPlacements: BuildInPlacements = {
|
9 | 9 | left: {
|
@@ -32,11 +32,11 @@ const builtinPlacements: BuildInPlacements = {
|
32 | 32 | },
|
33 | 33 | };
|
34 | 34 |
|
35 |
| -const Motion: MotionType = { |
| 35 | +const Motion: CSSMotionProps = { |
36 | 36 | motionName: 'case-motion',
|
37 | 37 | };
|
38 | 38 |
|
39 |
| -const MaskMotion: MotionType = { |
| 39 | +const MaskMotion: CSSMotionProps = { |
40 | 40 | motionName: 'mask-motion',
|
41 | 41 | };
|
42 | 42 |
|
@@ -98,7 +98,10 @@ const Demo = () => {
|
98 | 98 | const [placement, placementProps] = useControl('value', 'right');
|
99 | 99 | const [stretch, stretchProps] = useControl('value', '');
|
100 | 100 | const [motion, motionProps] = useControl('checked', true);
|
101 |
| - const [destroyPopupOnHide, destroyPopupOnHideProps] = useControl('checked', false); |
| 101 | + const [destroyPopupOnHide, destroyPopupOnHideProps] = useControl( |
| 102 | + 'checked', |
| 103 | + false, |
| 104 | + ); |
102 | 105 | const [mask, maskProps] = useControl('checked', false);
|
103 | 106 | const [maskClosable, maskClosableProps] = useControl('checked', true);
|
104 | 107 | const [forceRender, forceRenderProps] = useControl('checked', false);
|
@@ -215,7 +218,11 @@ const Demo = () => {
|
215 | 218 | }}
|
216 | 219 | >
|
217 | 220 | <div
|
218 |
| - style={{ margin: 20, display: 'inline-block', background: 'rgba(255, 0, 0, 0.05)' }} |
| 221 | + style={{ |
| 222 | + margin: 20, |
| 223 | + display: 'inline-block', |
| 224 | + background: 'rgba(255, 0, 0, 0.05)', |
| 225 | + }} |
219 | 226 | tabIndex={0}
|
220 | 227 | role="button"
|
221 | 228 | >
|
|
0 commit comments