Skip to content

Commit 8882b5c

Browse files
committed
format fix
1 parent afbd240 commit 8882b5c

5 files changed

Lines changed: 23 additions & 18 deletions

File tree

examples/kitchen-sink/app.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {ExpoConfig} from "expo/config";
1+
import type { ExpoConfig } from "expo/config";
22

33
export default {
44
name: "react-native-magic-modal-example",

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
/* eslint-disable react-native/no-color-literals */
2+
import type { Direction } from "react-native-magic-modal";
23
import React from "react";
34
import { Platform, Pressable, StyleSheet, Text } from "react-native";
45
import { ScrollView } from "react-native-gesture-handler";
5-
import {
6-
7-
magicModal,
8-
MagicModalHideReason
9-
} from "react-native-magic-modal";
10-
import type {Direction} from "react-native-magic-modal";
6+
import { magicModal, MagicModalHideReason } from "react-native-magic-modal";
117
import { ZoomIn, ZoomOut } from "react-native-reanimated";
128
import { router } from "expo-router";
139
import { StatusBar } from "expo-status-bar";
@@ -47,7 +43,11 @@ interface ModalResponse {
4743
const showReplacingModals = async () => {
4844
const modalResponse = magicModal.show<ModalResponse>(() => <ExampleModal />);
4945

50-
await new Promise<void>((resolve) => setTimeout(() => { resolve(); }, 1000));
46+
await new Promise<void>((resolve) =>
47+
setTimeout(() => {
48+
resolve();
49+
}, 1000),
50+
);
5151

5252
magicModal.hide<ModalResponse>(
5353
{ message: "close timeout" },
@@ -126,7 +126,9 @@ export default () => {
126126
<>
127127
<Pressable
128128
style={styles.button}
129-
onPress={() => { router.push("/modal"); }}
129+
onPress={() => {
130+
router.push("/modal");
131+
}}
130132
>
131133
<Text style={styles.buttonText}>Open Modal Screen</Text>
132134
</Pressable>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ export const ExampleModal = () => {
1515
This is an example to showcase the imperative Magic Modal!
1616
</Text>
1717
<Pressable
18-
onPress={() => { hide("close button pressed"); }}
18+
onPress={() => {
19+
hide("close button pressed");
20+
}}
1921
style={styles.buttonContainer}
2022
>
2123
<Text style={styles.button}>Close Modal</Text>

packages/modal/src/constants/defaultConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import type { ModalProps } from "./types";
12
import { ANIMATION_DURATION_IN_MS } from "./animations";
2-
import type {ModalProps} from "./types";
33

44
export const defaultDirection = "down";
55

packages/modal/src/utils/magicModalHandler.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
import React from "react";
22

3+
import type {
4+
DisableFullWindowOverlayFunction,
5+
EnableFullWindowOverlayFunction,
6+
GlobalHideAllFunction,
7+
GlobalHideFunction,
8+
GlobalShowFunction,
9+
} from "../constants/types";
310
import {
4-
5-
6-
7-
8-
911
// HideReturn is used in JS Doc
1012
// eslint-disable-next-line unused-imports/no-unused-imports, @typescript-eslint/no-unused-vars
11-
HideReturn
13+
HideReturn,
1214
} from "../constants/types";
13-
import type {DisableFullWindowOverlayFunction, EnableFullWindowOverlayFunction, GlobalHideAllFunction, GlobalHideFunction, GlobalShowFunction} from "../constants/types";
1415

1516
export const magicModalRef = React.createRef<IModal>();
1617

0 commit comments

Comments
 (0)