File tree 2 files changed +17
-0
lines changed
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ export type ModalProps = {
26
26
onClose : ( ) => void ;
27
27
closeButtonLabel ?: LocalizedString ;
28
28
isDestructive ?: boolean ;
29
+ loadingMessage ?: ActionsProps [ "loadingMessage" ] ;
30
+ error ?: ActionsProps [ "error" ] ;
29
31
} ;
30
32
31
33
type ModalConfig = {
@@ -106,6 +108,8 @@ export function createModal(
106
108
}
107
109
secondaryAction = { props . secondaryAction }
108
110
size = "large"
111
+ loadingMessage = { props . loadingMessage }
112
+ error = { props . error }
109
113
/>
110
114
</ Inset >
111
115
</ Box >
Original file line number Diff line number Diff line change @@ -35,6 +35,19 @@ export const WithActions = createStory({
35
35
} ,
36
36
} ) ;
37
37
38
+ export const WithError = createStory ( {
39
+ children : [ < Placeholder /> ] ,
40
+ primaryAction : {
41
+ label : formatMessage ( "Create" ) ,
42
+ onPress : action ( "Create" ) ,
43
+ } ,
44
+ secondaryAction : {
45
+ label : formatMessage ( "Cancel" ) ,
46
+ onPress : action ( "Cancel" ) ,
47
+ } ,
48
+ error : formatMessage ( "Something went wrong" ) ,
49
+ } ) ;
50
+
38
51
export const Destructive = createStory ( {
39
52
isDestructive : true ,
40
53
title : formatMessage ( "Delete item" ) ,
You can’t perform that action at this time.
0 commit comments