Skip to content

Commit

Permalink
[@mantine/modals] Fix incorrect context modals type (#1323)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrxnds authored Apr 25, 2022
1 parent 40e83ee commit 707db1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mantine-modals/src/ModalsProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface ModalsProviderProps {
children: React.ReactNode;

/** Predefined modals */
modals?: Record<string, React.FC<ContextModalProps>>;
modals?: Record<string, React.FC<ContextModalProps<any>>>;

/** Shared Modal component props, applied for every modal */
modalProps?: ModalSettings;
Expand Down
4 changes: 2 additions & 2 deletions src/mantine-modals/src/use-modals/use-modals.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect } from 'react';
import React, { useEffect, PropsWithChildren } from 'react';
import ReactDOM from 'react-dom';
import { renderHook, WrapperComponent } from '@testing-library/react-hooks';
import { MantineProvider } from '@mantine/core';
Expand Down Expand Up @@ -29,7 +29,7 @@ describe('@mantine/modals/use-modals', () => {
});

it('returns context value of ModalsProvider', () => {
const wrapper = ({ children }) => (
const wrapper = ({ children }: PropsWithChildren<unknown>) => (
<MantineProvider>
<ModalsProvider>{children}</ModalsProvider>
</MantineProvider>
Expand Down

0 comments on commit 707db1d

Please sign in to comment.