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 {
4646 ref : React . RefCallback < Element > ;
4747 onClick : ( event : React . SyntheticEvent ) => void ;
4848}
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 {
5055 children ?: React . ReactElement ;
5156 role ?: string ;
5257 style ?: React . CSSProperties ;
@@ -74,7 +79,9 @@ export interface ModalProps extends TransitionCallbacks {
7479 restoreFocusOptions ?: {
7580 preventScroll : boolean ;
7681 } ;
82+ }
7783
84+ export interface ModalProps extends BaseModalProps {
7885 [ other : string ] : any ;
7986}
8087
You can’t perform that action at this time.
0 commit comments