UNPKG

@hhgtech/hhg-components

Version:
17 lines (14 loc) 1.03 kB
import { _ as __rest } from './tslib.es6-00ab44b2.js'; import React__default from 'react'; import { MantineProvider as MantineProvider$1 } from '@mantine/core'; import { u as useMantineLocale, g as getMantineThemeOverride, N as NotificationsHandler } from './index-3f09210d.js'; import { C as CustomStylesType, T as TemplateProvider } from './index-17c85f76.js'; const MantineProvider = (_a) => { var { children, locale, template = 'hb', isNotifications = true, customStyleType = CustomStylesType.NONE } = _a, props = __rest(_a, ["children", "locale", "template", "isNotifications", "customStyleType"]); useMantineLocale(locale); return (React__default.createElement(MantineProvider$1, Object.assign({ theme: getMantineThemeOverride(locale, template, customStyleType) }, props), React__default.createElement(TemplateProvider, { variant: customStyleType }, children, isNotifications && React__default.createElement(NotificationsHandler, null)))); }; export { MantineProvider as M };