added header

This commit is contained in:
aman.singh
2022-12-06 18:22:09 +05:30
parent b48fc75a09
commit 53f131b4bd
4 changed files with 36 additions and 6 deletions

14
App.tsx
View File

@@ -22,6 +22,7 @@ import {createNativeStackNavigator} from '@react-navigation/native-stack';
import Widget from './src/components/form';
import {navigationRef} from './src/components/utlis/navigationUtlis';
import {GenericStyles} from './RN-UI-LIB/src/styles';
import FullScreenLoader from './RN-UI-LIB/src/components/FullScreenLoader';
function HomeScreen() {
return (
@@ -40,16 +41,25 @@ const App = () => {
return (
<Provider store={store}>
<PersistGate
loading={<Text>Loading...</Text>}
loading={<FullScreenLoader loading />}
persistor={persistor}>
<NavigationContainer ref={navigationRef}>
<Stack.Navigator>
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen
name="Home"
component={HomeScreen}
options={{
header: () => null,
}}
/>
{Object.keys(data.widgets).map(key => (
<Stack.Screen
key={key}
name={key}
component={Widget}
options={{
header: () => null,
}}
/>
))}
</Stack.Navigator>

View File

@@ -1,10 +1,12 @@
import React, {useState} from 'react';
import {useForm} from 'react-hook-form';
import {ScrollView, StyleSheet, View} from 'react-native';
import {Pressable, ScrollView, StyleSheet, View} from 'react-native';
import {SafeAreaView} from 'react-native-safe-area-context';
import {useDispatch, useSelector} from 'react-redux';
import Button from '../../../RN-UI-LIB/src/components/Button';
import Heading from '../../../RN-UI-LIB/src/components/Heading';
import Text from '../../../RN-UI-LIB/src/components/Text';
import CloseIcon from '../../../RN-UI-LIB/src/Icons/CloseIcon';
import {GenericStyles, getShadowStyle} from '../../../RN-UI-LIB/src/styles';
import {COLORS} from '../../../RN-UI-LIB/src/styles/colors';
import template from '../../data/templateData.json';
@@ -168,6 +170,25 @@ const Widget = (props: any) => {
return (
<SafeAreaView
style={[GenericStyles.whiteBackground, GenericStyles.fill]}>
<View
style={{
height: 96,
backgroundColor: '#001833',
paddingVertical: 22,
paddingHorizontal: 16,
}}>
<View style={[GenericStyles.row]}>
<Pressable onPress={()=> navigateToScreen('Home')}>
<CloseIcon color="#ffffff" />
</Pressable>
<View style={{marginLeft: 16}}>
<Heading type={'h5'} bold style={[GenericStyles.whiteText]}>
Add feedback for Kunal
</Heading>
<Text light>Communication address</Text>
</View>
</View>
</View>
<ScrollView
contentContainerStyle={[
GenericStyles.p16,

View File

@@ -40,8 +40,7 @@
},
"actions": {
"true": "verified",
"false": "not verified",
""
"false": "not verified"
}
},
"isLeaf": false