Skip to content

Commit

Permalink
#1 - Start design menu
Browse files Browse the repository at this point in the history
  • Loading branch information
L committed Nov 16, 2021
1 parent 70149df commit b55cf6e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 10 deletions.
12 changes: 10 additions & 2 deletions packages/components/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { createNativeStackNavigator } from '@react-navigation/native-stack'
import { Provider } from 'react-redux'

import { store } from './store'
import { RootStackParamList } from './navigation'
import { RootStackParamList } from './navigation/navigation'
import Menu from './features/menu/Menu'

const Stack = createNativeStackNavigator<RootStackParamList>()
Expand All @@ -23,7 +23,15 @@ export function App() {
<Provider store={store}>
<NavigationContainer>
<Stack.Navigator initialRouteName="Menu">
<Stack.Screen name="Menu" component={Menu} />
<Stack.Screen
name="Menu"
component={Menu}
options={{
// headerTransparent: true,
headerBlurEffect: 'prominent',
headerTitleAlign: 'center',
}}
/>
</Stack.Navigator>
</NavigationContainer>
</Provider>
Expand Down
37 changes: 29 additions & 8 deletions packages/components/src/features/menu/Menu.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { Component } from 'react'
import { Text, View, StyleSheet, TouchableOpacity } from 'react-native'
import { Text, View, StyleSheet, Image, TouchableOpacity } from 'react-native'
import { useSelector, useDispatch } from 'react-redux'
import { NativeStackNavigationProp } from '@react-navigation/native-stack'

// import { Button } from '../../components/'
import { RootState } from '../../store'
import { decrement, increment } from './slice'
import { RootStackParamList } from '../../navigation'
import { RootStackParamList } from '../../navigation/navigation'

type Props = {
navigation: NativeStackNavigationProp<RootStackParamList, 'Menu'>
Expand All @@ -21,9 +21,19 @@ export default ({ navigation }: Props) => {

return (
<View style={styles.container}>
<TouchableOpacity onPress={() => 0}>
<Text>I Already have an account</Text>
</TouchableOpacity>
<Image
style={styles.bannerImage}
source={{
uri:
'https://image.freepik.com/free-photo/chinese-food-vegan-stir-fry-noodles-with-red-cabbage-carrot-bowl-black-wooden-background-asian-cuisine-meal-banner-top-view_2829-8181.jpg',
}}
/>
<View style={styles.card}>
<Text style={styles.title}>Chicken sandwich</Text>
</View>
<View style={styles.card}>
<Text>test</Text>
</View>
</View>
)
}
Expand All @@ -32,8 +42,19 @@ const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white',
padding: 20,
justifyContent: 'space-between',
alignItems: 'center',
// justifyContent: 'space-between',
// alignItems: 'center',
// flexDirection: 'column',
},
card: {
backgroundColor: 'white',
paddingVertical: 12,
paddingHorizontal: 20,
},
title: {
fontSize: 20,
},
bannerImage: {
height: 140,
},
})
File renamed without changes.

0 comments on commit b55cf6e

Please sign in to comment.