Skip to content

Commit

Permalink
🛠 Refactor: Types - Extract to ModalViewState
Browse files Browse the repository at this point in the history
Summary: Extract type`ModalViewState` from `src/components/ModalView/ModalViewProps` to it's own file `src/components/ModalView/ModalViewState`.
  • Loading branch information
dominicstop committed Apr 22, 2023
1 parent ff97306 commit e9efa35
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/components/ModalView/ModalView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ import {

import { RNIModalViewModule } from '../../native_modules/RNIModalViewModule';

import type { ModalViewProps, ModalViewState } from './ModalViewProps';
import type { ModalViewProps } from './ModalViewProps';
import type { ModalViewState } from './ModalViewState';

import {
ModalViewEmitterEvents,
Expand Down
10 changes: 1 addition & 9 deletions src/components/ModalView/ModalViewProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,4 @@ export type ModalViewDeprecatedProps = {

// prettier-ignore
export type ModalViewProps =
ViewProps & ModalViewBaseProps & ModalViewDeprecatedProps;

export type ModalViewState = {
isModalVisible: boolean;
childProps: unknown;
enableSwipeGesture: boolean;
isModalInPresentation: boolean;
isModalInFocus: boolean;
};
ViewProps & ModalViewBaseProps & ModalViewDeprecatedProps;
7 changes: 7 additions & 0 deletions src/components/ModalView/ModalViewState.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export type ModalViewState = {
isModalVisible: boolean;
childProps: unknown;
enableSwipeGesture: boolean;
isModalInPresentation: boolean;
isModalInFocus: boolean;
};

0 comments on commit e9efa35

Please sign in to comment.