diff --git a/App.tsx b/App.tsx index ebabe1a8..c959210a 100644 --- a/App.tsx +++ b/App.tsx @@ -1,14 +1,8 @@ -/** - * Sample React Native App - * https://github.com/facebook/react-native - * - * Generated with the TypeScript template - * https://github.com/react-native-community/react-native-template-typescript - * - * @format - */ - import React from 'react'; +import {SafeAreaView, View} from 'react-native'; +import data from './src/data/templateData.json'; +import userData from './src/data/userData.json'; +import RenderingEngine from './src/components/formRenderingEngine'; import {Provider} from 'react-redux'; import store, {persistor} from './src/store/store'; import {PersistGate} from 'redux-persist/integration/react'; diff --git a/ProtectedRouter.tsx b/ProtectedRouter.tsx index ce14f53e..7717428e 100644 --- a/ProtectedRouter.tsx +++ b/ProtectedRouter.tsx @@ -45,7 +45,7 @@ const ProtectedRouter = () => { <> null, }} diff --git a/src/components/form/components/ImageUpload.tsx b/src/components/form/components/ImageUpload.tsx index eb524217..137e3d87 100644 --- a/src/components/form/components/ImageUpload.tsx +++ b/src/components/form/components/ImageUpload.tsx @@ -1,4 +1,11 @@ -import {Image, StyleSheet, Text, View} from 'react-native'; +import { + Image, + ImageBackground, + Pressable, + StyleSheet, + Text, + View, +} from 'react-native'; import React, {useEffect} from 'react'; import {Control, Controller} from 'react-hook-form'; import CameraClickPicture from '../../../../RN-UI-LIB/src/components/camera_click_picture/CameraClickPicture'; @@ -9,6 +16,8 @@ import {useState} from 'react'; import {useSelector} from 'react-redux'; import {RootState} from '../../../store/store'; import ErrorMessage from './ErrorMessage'; +import DeleteIcon from '../../../../RN-UI-LIB/src/Icons/DeleteIcon'; +import {COLORS} from '../../../../RN-UI-LIB/src/styles/colors'; interface IImageUpload { questionType: string; @@ -44,7 +53,7 @@ const ImageUpload: React.FC = props => { } return ( - + {question.text}{' '} {question.type === 'mandatory' && ( * @@ -69,8 +78,13 @@ const ImageUpload: React.FC = props => { /> ) : ( - setImage('')}>delete - + + setImage('')} + style={styles.deleteButton}> + + + )} @@ -86,6 +100,19 @@ const styles = StyleSheet.create({ borderWidth: 1, borderColor: 'red', }, + deleteButton: { + position: 'absolute', + right: 8, + top: 8, + backgroundColor: COLORS.BACKGROUND.PRIMARY, + height: 28, + width: 28, + borderRadius: 14, + justifyContent: 'center', + alignItems: 'center', + borderWidth: 1, + borderColor: COLORS.BORDER.PRIMARY, + }, }); export default ImageUpload; diff --git a/src/components/form/index.tsx b/src/components/form/index.tsx index 37f79612..2a90fd52 100644 --- a/src/components/form/index.tsx +++ b/src/components/form/index.tsx @@ -1,3 +1,4 @@ +import ArrowBackSolidIcon from '../../../RN-UI-LIB/src/Icons/ArrowBackSolidIcon'; import React, {useState} from 'react'; import {useForm} from 'react-hook-form'; import {Pressable, ScrollView, StyleSheet, View} from 'react-native'; @@ -178,11 +179,14 @@ const Widget = (props: any) => { paddingHorizontal: 16, }}> - navigateToScreen('Home')}> + navigateToScreen('Home')}> - + Add feedback for Kunal Communication address @@ -229,9 +233,15 @@ const Widget = (props: any) => { GenericStyles.p16, styles.borderTop, ]}> -