From a5ce98f49f8889839350e1e7a029ee6f2fb41ba0 Mon Sep 17 00:00:00 2001 From: David Oduneye Date: Thu, 7 Dec 2023 17:01:29 -0500 Subject: [PATCH] fix: styling for action --- client-new/src/components/task/Actions.tsx | 69 ++++++++++--------- .../src/screens/app/tasks/SubTaskScreen.tsx | 34 ++++++--- 2 files changed, 63 insertions(+), 40 deletions(-) diff --git a/client-new/src/components/task/Actions.tsx b/client-new/src/components/task/Actions.tsx index 6e946cd..ade6849 100644 --- a/client-new/src/components/task/Actions.tsx +++ b/client-new/src/components/task/Actions.tsx @@ -72,35 +72,45 @@ const FormComponent = ({ actions, subTaskName }: FormComponentProps) => { } }; + // return ( - - + {actions.map((action, index) => ( - error.path[0] === action.name)} - key={index} - mt={4} - > - - {action.label} - - {renderField(action, index)} - + + error.path[0] === action.name)} + key={index} + mt={4} + > + + {action.label} + + {renderField(action, index)} + + ))} - - + + ); +} + +export default FormComponent; + +type SubmitButtonProps = { + handleSubmit: (e: GestureResponderEvent) => void +} + +const SubmitButton = ({ handleSubmit }: SubmitButtonProps) => { + return ( + - - ); -} - -export default FormComponent; \ No newline at end of file + ) +} \ No newline at end of file diff --git a/client-new/src/screens/app/tasks/SubTaskScreen.tsx b/client-new/src/screens/app/tasks/SubTaskScreen.tsx index c0405d5..ac9219b 100644 --- a/client-new/src/screens/app/tasks/SubTaskScreen.tsx +++ b/client-new/src/screens/app/tasks/SubTaskScreen.tsx @@ -8,6 +8,8 @@ import FormComponent from '@/components/task/Actions'; import { ISubTask } from '@/interfaces/ISubTask'; import BackArrowIcon from '@/components/icons/BackArrow'; import ActivityLoader from '@/components/reusable/ActivityLoader'; +import { heightPercentageToDP as h, widthPercentageToDP as w } from 'react-native-responsive-screen'; +import { moderateScale, verticalScale } from '@/utils/FontSizeUtils'; type SubTaskScreenProps = { route: any @@ -23,7 +25,7 @@ const SubTaskScreen = ({ route, navigation }: SubTaskScreenProps) => { return ( - + navigation.goBack()}> @@ -32,19 +34,33 @@ const SubTaskScreen = ({ route, navigation }: SubTaskScreenProps) => { - - + + {subtask.sub_task_name} - - - {subtask.sub_task_description} - - + + + {subtask.sub_task_description} + + {isLoading && } {error && error } {data === null && null } {data && data.actions && ( - + )}