From cdd1df30d89e6ebe8f25392e77d80076a73df433 Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Wed, 21 Jun 2023 11:42:32 +0530 Subject: [PATCH] Tailwinds `ResourceCreate.tsx` (#5667) * tailwinds #4992 * fixes #5692 * adds missing required --- src/Components/Resource/ResourceCreate.tsx | 228 ++++++++++----------- 1 file changed, 110 insertions(+), 118 deletions(-) diff --git a/src/Components/Resource/ResourceCreate.tsx b/src/Components/Resource/ResourceCreate.tsx index 2f1203bdc91..6bed5cacee1 100644 --- a/src/Components/Resource/ResourceCreate.tsx +++ b/src/Components/Resource/ResourceCreate.tsx @@ -10,7 +10,6 @@ import { RESOURCE_SUBCATEGORIES, } from "../../Common/constants"; import { parsePhoneNumberFromString } from "libphonenumber-js"; -import { Card, CardContent } from "@material-ui/core"; import { phonePreg } from "../../Common/validation"; import { createResource, getAnyFacility } from "../../Redux/actions"; @@ -24,8 +23,9 @@ import { SelectFormField } from "../Form/FormFields/SelectFormField"; import TextAreaFormField from "../Form/FormFields/TextAreaFormField"; import RadioFormField from "../Form/FormFields/RadioFormField"; import { FieldLabel } from "../Form/FormFields/FormField"; +import Card from "../../CAREUI/display/Card"; +import Page from "../Common/components/Page"; -const PageTitle = loadable(() => import("../Common/PageTitle")); const Loading = loadable(() => import("../Common/Loading")); interface resourceProps { @@ -219,121 +219,113 @@ export default function ResourceCreate(props: resourceProps) { } return ( -
- -
- - -
- - - -
- {t("approving_facility")} - - handleValueChange(value, "approving_facility") - } - errors={state.errors.approving_facility} - /> -
- - option} - optionValue={(option: string) => option} - onChange={({ value }) => handleValueChange(value, "category")} - /> - option.text} - optionValue={(option: OptionsType) => option.id} - onChange={({ value }) => - handleValueChange(value, "sub_category") - } - /> - - - - - -
- -
- - (o ? t("yes") : t("no"))} - optionValue={(o) => String(o)} - value={state.form.emergency} - onChange={handleChange} - /> - -
- goBack()} /> - -
-
-
-
-
-
+ + + + + +
+ {t("approving_facility")} + + handleValueChange(value, "approving_facility") + } + errors={state.errors.approving_facility} + /> +
+ + (o ? t("yes") : t("no"))} + optionValue={(o) => String(o)} + value={state.form.emergency} + onChange={handleChange} + /> + + option} + optionValue={(option: string) => option} + onChange={({ value }) => handleValueChange(value, "category")} + /> + option.text} + optionValue={(option: OptionsType) => option.id} + onChange={({ value }) => handleValueChange(value, "sub_category")} + /> + + + + + +
+ +
+ +
+ goBack()} /> + +
+
+
); }