Styling for forms

This commit is contained in:
Peter
2024-08-08 21:32:37 +02:00
parent 94c336fb74
commit 4dda70effc
16 changed files with 667 additions and 6314 deletions
+4 -4
View File
@@ -58,11 +58,11 @@ const GenericForm = (formData: FormData) => {
const [prevLength, setPrevLength] = useState(0);
return (
<div className="container">
<div>
<div>
<h1>{formData.title}</h1>
</div>
<div>
<div className="container">
<Formik
initialValues={userInput}
validationSchema={spec}
@@ -134,10 +134,10 @@ const GenericForm = (formData: FormData) => {
<ErrorMessage name={steps[currentStep].name} component="div"/>
</label>
</div>
<button type="button" onClick={prev} disabled={currentStep === 0}>
<button style={{marginLeft: 0}} className="button-outer" type="button" onClick={prev} disabled={currentStep === 0}>
Previous
</button>
<button type="button" onClick={next}
<button className="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