Skip to content

Commit

Permalink
feat: 🎸 Removed unused stories, added default prop value
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Boyle committed Jan 14, 2021
1 parent 89282c3 commit 56ebd87
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 34 deletions.
2 changes: 0 additions & 2 deletions src/components/SQFormDialog/SQFormDialogInner.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ SQFormDialogInner.propTypes = {
disableBackdropClick: PropTypes.bool,
/** The current disabled state of the Dialog Save Button */
isDisabled: PropTypes.bool,
/** Should the loading spinner be shown */
isLoading: PropTypes.bool,
/** The current open/closed state of the Dialog */
isOpen: PropTypes.bool.isRequired,
/** Determine the max-width of the dialog. The dialog width grows with the size of the screen. Set to false to disable maxWidth. */
Expand Down
2 changes: 1 addition & 1 deletion src/components/SQFormDialogStepper/SQFormDialogStepper.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function SQFormDialogStepper({
contentStyle,
initialValues,
loadingMessage,
isLoading,
isLoading = false,
...props
}) {
const steps = React.Children.toArray(children);
Expand Down
31 changes: 0 additions & 31 deletions stories/SQFormDialog.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,34 +93,3 @@ export const sqFormDialogWithAutoFocus = () => (
</SQFormDialog>
</>
);

export const sqFormDialogLoading = () => (
<>
<h1>Click the Knobs tab below to toggle the open state of the Dialog</h1>
<SQFormDialog
isOpen={boolean('isOpen', false, 'Open/Close Dialog')}
isDisabled={boolean(
'isDisabled',
false,
'Toggle disabled state of Save Button'
)}
maxWidth="sm"
onClose={action('Close button clicked')}
onSave={handleSubmit}
title="Create New User"
initialValues={MOCK_EMPTY_USER_STATE}
muiGridProps={{
spacing: 2,
alignItems: 'center'
}}
isLoading={true}
>
<SQFormTextField
name="firstName"
label="First Name (Auto Focused)"
muiFieldProps={{autoFocus: true}}
/>
<SQFormTextField name="lastName" label="Last Name" />
</SQFormDialog>
</>
);

0 comments on commit 56ebd87

Please sign in to comment.