File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,12 @@ export interface RenderModalBackdropProps {
46
46
ref : React . RefCallback < Element > ;
47
47
onClick : ( event : React . SyntheticEvent ) => void ;
48
48
}
49
- export interface ModalProps extends TransitionCallbacks {
49
+
50
+ /*
51
+ Modal props are split into a version with and without index signature so that you can fully use them in another projects
52
+ This is due to Typescript not playing well with index singatures e.g. when using Omit
53
+ */
54
+ export interface BaseModalProps extends TransitionCallbacks {
50
55
children ?: React . ReactElement ;
51
56
role ?: string ;
52
57
style ?: React . CSSProperties ;
@@ -74,7 +79,9 @@ export interface ModalProps extends TransitionCallbacks {
74
79
restoreFocusOptions ?: {
75
80
preventScroll : boolean ;
76
81
} ;
82
+ }
77
83
84
+ export interface ModalProps extends BaseModalProps {
78
85
[ other : string ] : any ;
79
86
}
80
87
You can’t perform that action at this time.
0 commit comments