Skip to content

Commit 38770ac

Browse files
committed
type: Fix type errors.
1 parent 63dff75 commit 38770ac

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

components/Modal/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default (props: ModalProps = {}) => {
1515
placement = 'bottom',
1616
...otherProps
1717
} = props;
18-
const [display] = useState('none');
18+
const [display] = useState<'none' | 'flex'>('none');
1919
let [layoutHeight, setLayoutHeight] = useState(0);
2020
let [layoutWidth, setLayoutWidth] = useState(0);
2121
const [translateValue] = useState(new Animated.Value(0));
@@ -77,7 +77,6 @@ export default (props: ModalProps = {}) => {
7777
translateStyle.translateY = translateValue;
7878
}
7979
if (isHorizontal) {
80-
console.log('left', placement, getTransformSize());
8180
translateStyle.translateX = translateValue;
8281
}
8382
const child = (

0 commit comments

Comments
 (0)