Skip to content

Commit

Permalink
Merge pull request #900 from thundersdata-frontend/rn-issue
Browse files Browse the repository at this point in the history
fix: 修复类型问题
  • Loading branch information
chj-damon authored Sep 3, 2024
2 parents 2bf09bc + 3f109b1 commit 4ca5813
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/early-schools-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@td-design/react-native': patch
---

fix: 修复类型问题
2 changes: 1 addition & 1 deletion packages/react-native/src/modal/show/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ModalView from '../Modal/ModalView';
import { ImperativeModalChildrenProps, ModalProps } from '../type';

export default function show(
comp: React.ReactElement<ImperativeModalChildrenProps<{}>>,
comp: React.ReactElement,
props?: Omit<ModalProps, 'onAnimationEnd' | 'visible' | 'onClose'>
) {
const key = Portal.add(
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/src/modal/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@ export type TipProps = Omit<AlertProps, 'icon' | 'onPress' | 'confirmText'> & {

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

0 comments on commit 4ca5813

Please sign in to comment.