More style changes

This commit is contained in:
Peter
2024-08-09 23:16:41 +02:00
parent cde2a01dd9
commit 51642612ec
5 changed files with 55 additions and 42 deletions
+6 -6
View File
@@ -85,10 +85,10 @@ const GenericForm = (formData: FormData) => {
<div>
<div>
<label>
<label>
<label className="headline">
{steps[currentStep].label}
</label>
<label>
<label className="description">
{
steps[currentStep].additional_info ?
steps[currentStep].additional_info?.split('\n').map((line, i) => (
@@ -137,7 +137,7 @@ const GenericForm = (formData: FormData) => {
</label>
</div>
<div>
<label>
<label className="error-message">
<ErrorMessage name={steps[currentStep].name} component="div"/>
</label>
</div>
@@ -145,12 +145,12 @@ const GenericForm = (formData: FormData) => {
<button style={{marginLeft: 0}} className="button-outer" type="button" onClick={prev} disabled={currentStep === 0}>
Previous
</button>
<button className="button-outer" type="button" onClick={next}
<button className={currentStep === (steps.length - 1) ? "" : "button-outer"} type="button" onClick={next}
hidden={currentStep === (steps.length - 1)}
disabled={(!touched[steps[currentStep].name] || !!errors[steps[currentStep].name]) || currentStep === (steps.length - 1)}>
Next
</button>
<input type="submit" value="Submit"
</button>
<input className={currentStep !== (steps.length - 1) ? "" : "button-outer"} type="submit" value="Submit"
hidden={currentStep !== (steps.length - 1)}
disabled={!isValid || currentStep !== (steps.length - 1)}
/>