Skip to content

Commit

Permalink
fix: 🐛 add style prop for container of guided workflow
Browse files Browse the repository at this point in the history
We need to pass a style to the container of SQFormGuidedWorkflow.
  • Loading branch information
shahidsm5555 committed Jan 5, 2022
1 parent d53da44 commit 847167a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/components/SQFormGuidedWorkflow/PropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,7 @@ export const GuidedWorkflowProps = {
onError: PropTypes.func.isRequired,
/** Task Module configuration Object(s) */
taskModules: PropTypes.arrayOf(PropTypes.shape(TaskModuleProps).isRequired)
.isRequired
.isRequired,
/** An object of css-in-js style properties to be passed */
containerStyles: PropTypes.object
};
5 changes: 3 additions & 2 deletions src/components/SQFormGuidedWorkflow/SQFormGuidedWorkflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ function SQFormGuidedWorkflow({
mainSubtitle,
initialCompletedTasks = 0,
isStrictMode = false,
onError
onError,
containerStyles = {}
}) {
const classes = useStyles();

Expand Down Expand Up @@ -176,7 +177,7 @@ function SQFormGuidedWorkflow({
});

return (
<Section style={{padding: '20px'}}>
<Section style={{padding: '20px', ...containerStyles}}>
<SectionHeader title={mainTitle} informativeHeading={mainSubtitle} />
<SectionBody>
<Accordion accordionPanels={transformedTaskModules} />
Expand Down

0 comments on commit 847167a

Please sign in to comment.