Skip to content

Commit 1d4d261

Browse files
committed
Add confirm and back buttons to App component with styles
1 parent ce1373d commit 1d4d261

File tree

1 file changed

+58
-2
lines changed

1 file changed

+58
-2
lines changed

App.tsx

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useFonts } from "expo-font";
22
import { useRef } from 'react';
3-
import { StyleSheet, View } from 'react-native';
3+
import { Platform, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
44
import { GestureHandlerRootView } from 'react-native-gesture-handler';
55
import { useSharedValue } from 'react-native-reanimated';
66
import { SafeAreaProvider } from 'react-native-safe-area-context';
@@ -13,6 +13,7 @@ import { TimeRange } from './src/components/time-range';
1313
const LinesAmount = 200;
1414

1515
export default function App() {
16+
1617
const circularSliderRef = useRef<CircularDraggableSliderRefType>(null);
1718
const selectedDuration = useSharedValue(1);
1819
return (
@@ -38,8 +39,20 @@ export default function App() {
3839
}}
3940
/>
4041
</View>
41-
<View>
42+
<View style={styles.buttonsWrapper}>
43+
<TouchableOpacity
44+
style={styles.confirmButton}
45+
onPress={() => console.log('Confirm pressed')}
46+
>
47+
<Text style={styles.confirmButtonText}>Confirm</Text>
48+
</TouchableOpacity>
4249

50+
<TouchableOpacity
51+
style={styles.backButton}
52+
onPress={() => console.log('Back pressed')}
53+
>
54+
<Text style={styles.backButtonText}>← Back</Text>
55+
</TouchableOpacity>
4356
</View>
4457
<BottomTab />
4558
</View>
@@ -89,4 +102,47 @@ const styles = StyleSheet.create({
89102
backgroundColor: '#000',
90103
flex: 1,
91104
},
105+
buttonsWrapper: {
106+
paddingHorizontal: 20,
107+
paddingBottom: 8,
108+
gap: 12,
109+
},
110+
confirmButton: {
111+
backgroundColor: '#FFFFFF',
112+
borderRadius: 16,
113+
paddingVertical: 16,
114+
alignItems: 'center',
115+
justifyContent: 'center',
116+
// iOS shadow
117+
...Platform.select({
118+
ios: {
119+
shadowColor: '#FFFFFF',
120+
shadowOffset: { width: 0, height: 4 },
121+
shadowOpacity: 0.3,
122+
shadowRadius: 8,
123+
},
124+
android: {
125+
elevation: 8,
126+
},
127+
}),
128+
},
129+
confirmButtonText: {
130+
color: '#504e4eff',
131+
fontSize: 16,
132+
fontWeight: '600',
133+
},
134+
backButton: {
135+
backgroundColor: 'transparent',
136+
borderRadius: 16,
137+
paddingVertical: 16,
138+
alignItems: 'center',
139+
justifyContent: 'center',
140+
borderWidth: 1,
141+
borderColor: '#333333',
142+
},
143+
backButtonText: {
144+
color: '#FFFFFF',
145+
fontSize: 16,
146+
fontWeight: '600',
147+
},
92148
});

0 commit comments

Comments
 (0)