add dismiss button to minion feature
This commit is contained in:
5
App.js
5
App.js
@@ -1,5 +1,5 @@
|
|||||||
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
||||||
import { BackHandler, Platform, StatusBar, Modal, View, Image, StyleSheet } from 'react-native';
|
import { BackHandler, Platform, StatusBar, Modal, View, Image, StyleSheet, Button } from 'react-native';
|
||||||
import * as ScreenOrientation from 'expo-screen-orientation';
|
import * as ScreenOrientation from 'expo-screen-orientation';
|
||||||
import * as SplashScreen from 'expo-splash-screen';
|
import * as SplashScreen from 'expo-splash-screen';
|
||||||
import { Accelerometer } from 'expo-sensors';
|
import { Accelerometer } from 'expo-sensors';
|
||||||
@@ -275,6 +275,9 @@ export default function App() {
|
|||||||
style={{ flex: 1 }}
|
style={{ flex: 1 }}
|
||||||
resizeMode="contain"
|
resizeMode="contain"
|
||||||
/>
|
/>
|
||||||
|
<View style={{ position: 'absolute', top: 50, right: 20 }}>
|
||||||
|
<Button title="Dismiss" onPress={() => setShowMinion(false)} />
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</Modal>
|
</Modal>
|
||||||
<StatusBar barStyle={barStyle} backgroundColor={theme.bg} />
|
<StatusBar barStyle={barStyle} backgroundColor={theme.bg} />
|
||||||
|
|||||||
Reference in New Issue
Block a user