Files
notesnook/apps/mobile/App.js

90 lines
2.3 KiB
JavaScript
Raw Normal View History

2019-11-17 16:02:19 +05:00
import React, {useState, useEffect} from 'react';
import NavigationService, {
AppContainer,
} from './src/services/NavigationService';
2019-11-17 17:48:56 +05:00
import {StatusBar, View, SafeAreaView, TouchableOpacity} from 'react-native';
import {COLOR_SCHEME, SIZE, opacity, WEIGHT} from './src/common/common';
import Icon from 'react-native-vector-icons/Ionicons';
import ActionButton from 'react-native-action-button';
2019-11-15 01:17:59 +05:00
const App = () => {
2019-11-17 17:48:56 +05:00
const [colors, setColors] = useState(COLOR_SCHEME);
2019-11-17 16:02:19 +05:00
useEffect(() => {
StatusBar.setBackgroundColor('transparent');
StatusBar.setTranslucent(true);
StatusBar.setBarStyle('dark-content');
});
return (
2019-11-17 17:48:56 +05:00
<>
<AppContainer
ref={navigatorRef => {
NavigationService.setTopLevelNavigator(navigatorRef);
}}
/>
<ActionButton elevation={5} buttonColor={colors.accent}>
<ActionButton.Item
buttonColor="#9b59b6"
textStyle={{
fontFamily: WEIGHT.regular,
color: 'white',
}}
title=""
hideShadow={true}
onPress={() => console.log('notes tapped!')}>
<Icon
name="md-create"
style={{
fontSize: 20,
height: 22,
color: 'white',
}}
/>
</ActionButton.Item>
<ActionButton.Item
textStyle={{
fontFamily: WEIGHT.regular,
color: 'white',
}}
hideShadow={true}
buttonColor="#3498db"
title=""
2019-11-20 13:31:16 +05:00
onPress={() => {
NavigationService.navigate('ListsEditor');
}}>
2019-11-17 17:48:56 +05:00
<Icon
name="ios-list"
style={{
fontSize: 20,
height: 22,
color: 'white',
}}
/>
</ActionButton.Item>
<ActionButton.Item
textStyle={{
fontFamily: WEIGHT.regular,
color: 'white',
}}
hideShadow={true}
buttonColor="#1abc9c"
title=""
2019-11-22 06:08:27 +05:00
onPress={() => {
NavigationService.navigate('ReminderEditor');
}}>
2019-11-17 17:48:56 +05:00
<Icon
name="ios-clock"
style={{
fontSize: 20,
height: 22,
color: 'white',
}}
/>
</ActionButton.Item>
</ActionButton>
</>
2019-11-15 01:17:59 +05:00
);
};
export default App;