123
This commit is contained in:
23
providers/MantineModalsProvider.tsx
Normal file
23
providers/MantineModalsProvider.tsx
Normal file
@ -0,0 +1,23 @@
|
||||
import { ReactNode } from 'react';
|
||||
import { ModalsProvider } from '@mantine/modals';
|
||||
import MarketplaceFormModal from '@/pages/marketplaces/modals/MarketplaceFormModal/MarketplaceFormModal';
|
||||
|
||||
type Props = {
|
||||
children: ReactNode;
|
||||
};
|
||||
const modals = {
|
||||
marketplaceForm: MarketplaceFormModal,
|
||||
};
|
||||
declare module '@mantine/modals' {
|
||||
export interface MantineModalsOverride {
|
||||
modals: typeof modals;
|
||||
}
|
||||
}
|
||||
const MantineModalsProvider = ({ children }: Props) => {
|
||||
return (
|
||||
<ModalsProvider labels={{ cancel: 'Отменить', confirm: 'Подтвердить' }} modals={modals}>
|
||||
{children}
|
||||
</ModalsProvider>
|
||||
);
|
||||
};
|
||||
export default MantineModalsProvider;
|
||||
Reference in New Issue
Block a user