From da24d8eafaa196d47a7c72dfad77a1a8b2711c99 Mon Sep 17 00:00:00 2001 From: avenmia Date: Thu, 5 Sep 2024 17:01:50 -1000 Subject: [PATCH] Consolidating button styles --- src/components/AddressSearch.tsx | 28 ++++++++------ src/components/survey/demographicssurvey.tsx | 17 ++------- src/components/survey/surveyquestion.tsx | 11 +----- src/pages/index.tsx | 3 +- src/pages/polis.tsx | 15 ++------ src/pages/querysummary.tsx | 22 ++--------- src/styles/globals.css | 40 ++++++++++++++++++++ 7 files changed, 72 insertions(+), 64 deletions(-) diff --git a/src/components/AddressSearch.tsx b/src/components/AddressSearch.tsx index c585e29..d723964 100644 --- a/src/components/AddressSearch.tsx +++ b/src/components/AddressSearch.tsx @@ -114,7 +114,9 @@ const AddressSearch: React.FC = () => { }; const handleSubmit = () => { - console.log("Submitted!"); + if (!complete) { + return; + } const planningRegionDhhl = `${island ? island + "," : ""}${ county ? county + "," : "" }${planningRegion ?? ""}${dhhlRegion === "Yes" ? "-DHHL" : ""}`; @@ -313,22 +315,26 @@ const AddressSearch: React.FC = () => {
- - - + + ) : ( + - + )}
diff --git a/src/components/survey/demographicssurvey.tsx b/src/components/survey/demographicssurvey.tsx index 00f7c83..c7df32a 100644 --- a/src/components/survey/demographicssurvey.tsx +++ b/src/components/survey/demographicssurvey.tsx @@ -160,25 +160,16 @@ export default function DemographicsSurvey() {
- - - @@ -221,7 +212,7 @@ export default function DemographicsSurvey() {

- diff --git a/src/components/survey/surveyquestion.tsx b/src/components/survey/surveyquestion.tsx index ea59e7a..eb65fb8 100644 --- a/src/components/survey/surveyquestion.tsx +++ b/src/components/survey/surveyquestion.tsx @@ -82,10 +82,7 @@ export default function SurveyQuestion({ {getAnswers(question.questionType, question.answers)}
+
); })} -
-
-
+ +
- diff --git a/src/pages/querysummary.tsx b/src/pages/querysummary.tsx index 5da70a7..b9720dd 100644 --- a/src/pages/querysummary.tsx +++ b/src/pages/querysummary.tsx @@ -81,13 +81,7 @@ const QuerySummary: NextPage = () => {
- +
@@ -139,25 +133,17 @@ const QuerySummary: NextPage = () => {
- + -
- +
diff --git a/src/styles/globals.css b/src/styles/globals.css index dad4f80..d81cfd3 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -22,3 +22,43 @@ body, .geocoder-control-suggestion:hover { background-color: #f2f2f2; } + +.btn { + @apply mb-1 mt-4 flex flex-row items-center justify-center gap-1 rounded-full px-6 py-2 text-lg no-underline shadow-xl transition ease-in-out; +} + +.btn-next { + @apply bg-yellowGreen px-6 py-2 text-blue-darker; +} + +.btn-next:hover { + @apply translate-y-1 cursor-pointer bg-lightGreen; +} + +.btn-next:disabled { + @apply translate-y-0 cursor-not-allowed border-none transition-none; +} + +.btn-back { + @apply bg-white/80 px-6 py-2 text-blue-darker; +} + +.btn-back:hover { + @apply translate-y-1 bg-white; +} + +.btn-survey-back { + @apply border-2 border-dashed border-blue-darker bg-white text-blue-darker sm:px-2 md:px-4 lg:px-6; +} + +.btn-survey-back:hover { + @apply translate-y-1 bg-blue-darker/20; +} + +.btn-polis { + @apply w-full rounded-full bg-white/80 text-blue-darker sm:px-2 md:px-4 lg:px-6; +} + +.btn-polis:hover { + @apply translate-y-1 bg-white; +}