From 45d9aabb87fa89de4a5184b055e503b415ccbe23 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Fri, 5 Sep 2025 23:19:32 +0100 Subject: [PATCH] Enhance WizardView component by adding sideBar and submitText props for improved customization; refactor layout for better responsiveness and structure. --- .../Dashboard/common/WizardView.jsx | 45 ++++++++++++------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/src/components/Dashboard/common/WizardView.jsx b/src/components/Dashboard/common/WizardView.jsx index 8b6c464..e07bc1a 100644 --- a/src/components/Dashboard/common/WizardView.jsx +++ b/src/components/Dashboard/common/WizardView.jsx @@ -12,7 +12,9 @@ const WizardView = ({ title = 'Wizard View', onSubmit, formValid, - loading + loading, + sideBar = null, + submitText = 'Done' }) => { const [currentStep, setCurrentStep] = useState(0) const isMobile = useMediaQuery({ maxWidth: 768 }) @@ -20,27 +22,33 @@ const WizardView = ({ return ( {!isMobile && showSteps == true ? ( -
- -
+ sideBar != null ? ( + sideBar + ) : ( +
+ +
+ ) ) : null} {!isMobile && showSteps == true ? ( ) : null} - - - {title} - -
- {steps[currentStep].content} -
+ + + + {title} + +
+ {steps[currentStep].content} +
+
@@ -61,7 +70,9 @@ WizardView.propTypes = { steps: PropTypes.array.isRequired, showSteps: PropTypes.bool, title: PropTypes.string, - loading: PropTypes.bool + loading: PropTypes.bool, + sideBar: PropTypes.node, + submitText: PropTypes.string } export default WizardView