Skip to content

Commit 3a0607f

Browse files
committed
improve defaults
1 parent 2fa6d47 commit 3a0607f

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

examples/kitchen-sink/src/app/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

4747
const showReplacingModals = async () => {
4848
const modalResponse = magicModal.show<ModalResponse>(() => <ExampleModal />);

examples/kitchen-sink/src/components/KeyboardAvoidingModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import {
88
} from "react-native";
99
import { magicModal, useMagicModal } from "react-native-magic-modal";
1010

11-
type KeyboardAvoidingModalProps = {
11+
interface KeyboardAvoidingModalProps {
1212
initialText?: string;
13-
};
13+
}
1414

1515
const MAX_TEXT_LENGTH = 50;
1616

packages/eslint-config/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
{

packages/modal/src/components/MagicModalPortal/MagicModalPortal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ import { MagicModalProvider } from "../MagicModalProvider";
2424
const 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

0 commit comments

Comments
 (0)