Skip to content

Commit 4ca5813

Browse files
authored
Merge pull request #900 from thundersdata-frontend/rn-issue
fix: 修复类型问题
2 parents 2bf09bc + 3f109b1 commit 4ca5813

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/early-schools-shout.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@td-design/react-native': patch
3+
---
4+
5+
fix: 修复类型问题

packages/react-native/src/modal/show/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import ModalView from '../Modal/ModalView';
77
import { ImperativeModalChildrenProps, ModalProps } from '../type';
88

99
export default function show(
10-
comp: React.ReactElement<ImperativeModalChildrenProps<{}>>,
10+
comp: React.ReactElement,
1111
props?: Omit<ModalProps, 'onAnimationEnd' | 'visible' | 'onClose'>
1212
) {
1313
const key = Portal.add(

packages/react-native/src/modal/type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,5 @@ export type TipProps = Omit<AlertProps, 'icon' | 'onPress' | 'confirmText'> & {
7373

7474
export type ImperativeModalChildrenProps<P> = P & {
7575
/** 在弹窗组件内调用,用以关闭弹窗 */
76-
closeModal: () => void;
76+
closeModal?: () => void;
7777
};

0 commit comments

Comments
 (0)