File tree Expand file tree Collapse file tree
examples/kitchen-sink/src
modal/src/components/MagicModalPortal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,9 +40,9 @@ const showModal = async () => {
4040 console . log ( "Modal closed with response:" , await modalResponse . promise ) ;
4141} ;
4242
43- type ModalResponse = {
43+ interface ModalResponse {
4444 message : string ;
45- } ;
45+ }
4646
4747const showReplacingModals = async ( ) => {
4848 const modalResponse = magicModal . show < ModalResponse > ( ( ) => < ExampleModal /> ) ;
Original file line number Diff line number Diff line change 88} from "react-native" ;
99import { magicModal , useMagicModal } from "react-native-magic-modal" ;
1010
11- type KeyboardAvoidingModalProps = {
11+ interface KeyboardAvoidingModalProps {
1212 initialText ?: string ;
13- } ;
13+ }
1414
1515const MAX_TEXT_LENGTH = 50 ;
1616
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ const baseConfig = tseslint.config(
115115 "line-comment-position" : "off" ,
116116 "unused-imports/no-unused-imports" : "error" ,
117117 "@typescript-eslint/array-type" : "off" ,
118- "@typescript-eslint/consistent-type-definitions" : "off " ,
118+ "@typescript-eslint/consistent-type-definitions" : "error " ,
119119 "prefer-arrow-functions/prefer-arrow-functions" : [
120120 "error" ,
121121 {
Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ import { MagicModalProvider } from "../MagicModalProvider";
2424const generatePseudoRandomID = ( ) =>
2525 Math . random ( ) . toString ( 36 ) . substring ( 7 ) . toUpperCase ( ) + Date . now ( ) . toString ( ) ;
2626
27- type ModalStackItem = {
27+ interface ModalStackItem {
2828 id : string ;
2929 component : ModalChildren ;
3030 config : ModalProps ;
3131 hideCallback : ( value : unknown ) => void ;
3232 hideFunction : ( props : unknown ) => void ;
33- } ;
33+ }
3434/**
3535 * @description A magic portal that should stay on the top of the app component hierarchy for the modal to be displayed.
3636 * @example
You can’t perform that action at this time.
0 commit comments