@madie/madie-design-system 1.2.51 → 1.2.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/MadieDialog/MadieDialog.stories.js +45 -0
- package/components/MadieDialog/index.jsx +2 -2
- package/dist/browser.js +1 -1
- package/dist/index.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
- package/test/components/MadieDialog.test.js +33 -0
|
@@ -184,6 +184,51 @@ export const DialogWithActionButtons = () => {
|
|
|
184
184
|
);
|
|
185
185
|
};
|
|
186
186
|
|
|
187
|
+
export const DialogWithActionButtonsHideContinueButton = () => {
|
|
188
|
+
const [open, setOpen] = useState(false);
|
|
189
|
+
const onClose = () => {
|
|
190
|
+
setOpen(false);
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
return (
|
|
194
|
+
<>
|
|
195
|
+
<Button variant="cyan" onClick={() => setOpen(true)}>
|
|
196
|
+
open Dialog With Hide Continue Button
|
|
197
|
+
</Button>
|
|
198
|
+
<MadieDialog
|
|
199
|
+
title="Human Readable"
|
|
200
|
+
sx={{
|
|
201
|
+
"#modal-body": {
|
|
202
|
+
h2: {
|
|
203
|
+
borderTop: "1px solid black",
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
}}
|
|
207
|
+
dialogProps={{
|
|
208
|
+
onClose,
|
|
209
|
+
open,
|
|
210
|
+
maxWidth: "lg",
|
|
211
|
+
fullWidth: true,
|
|
212
|
+
}}
|
|
213
|
+
cancelButtonProps={{
|
|
214
|
+
variant: "secondary",
|
|
215
|
+
cancelText: "Cancel",
|
|
216
|
+
"data-testid": "cancel-button",
|
|
217
|
+
}}
|
|
218
|
+
continueButtonProps={""}
|
|
219
|
+
>
|
|
220
|
+
<DialogContent>
|
|
221
|
+
<div data-testid="view-modal">
|
|
222
|
+
<Typography>
|
|
223
|
+
<div>Some Text</div>
|
|
224
|
+
</Typography>
|
|
225
|
+
</div>
|
|
226
|
+
</DialogContent>
|
|
227
|
+
</MadieDialog>
|
|
228
|
+
</>
|
|
229
|
+
);
|
|
230
|
+
};
|
|
231
|
+
|
|
187
232
|
export const DialogWithPopoverActionButtons = () => {
|
|
188
233
|
const [open, setOpen] = useState(false);
|
|
189
234
|
const onClose = () => {
|
|
@@ -93,7 +93,7 @@ const Actions = ({ onClose, cancelButtonProps, continueButtonProps }) => {
|
|
|
93
93
|
additionalSelectOptionProps={popoverOptions}
|
|
94
94
|
/>
|
|
95
95
|
</>
|
|
96
|
-
) : (
|
|
96
|
+
) : continueButtonProps ? (
|
|
97
97
|
<Button
|
|
98
98
|
className="qpp-c-button--cyan"
|
|
99
99
|
type="submit"
|
|
@@ -105,7 +105,7 @@ const Actions = ({ onClose, cancelButtonProps, continueButtonProps }) => {
|
|
|
105
105
|
{continueIcon}
|
|
106
106
|
</span>
|
|
107
107
|
</Button>
|
|
108
|
-
)}
|
|
108
|
+
) : null}
|
|
109
109
|
</DialogActions>
|
|
110
110
|
</>
|
|
111
111
|
);
|