|
1 | | -import { createTheme, MantineProvider, Notification as MantineNotification } from '@mantine/core'; |
| 1 | +import { MantineProvider } from '@mantine/core'; |
2 | 2 | import { Notifications, notifications } from '@mantine/notifications'; |
3 | 3 | import $ from 'jquery'; |
4 | 4 | import React from 'react'; |
| 5 | +import { theme } from 'vj/components/mantine.page'; |
5 | 6 | import { tpl, zIndexManager } from 'vj/utils/base'; |
6 | 7 |
|
7 | | -const colorWhite = { |
8 | | - color: 'var(--mantine-color-white)', |
9 | | -} as const; |
10 | | - |
11 | | -const theme = createTheme({ |
12 | | - components: { |
13 | | - Notification: MantineNotification.extend({ |
14 | | - classNames: { |
15 | | - closeButton: 'mantine-notifications-close-button', |
16 | | - }, |
17 | | - styles: { |
18 | | - root: { |
19 | | - backgroundColor: 'var(--notification-color, var(--mantine-primary-color-filled))', |
20 | | - paddingInlineStart: 'var(--mantine-spacing-xs)', |
21 | | - }, |
22 | | - title: { |
23 | | - ...colorWhite, |
24 | | - fontSize: 'var(--mantine-font-size-md)', |
25 | | - }, |
26 | | - icon: { |
27 | | - fontSize: '24px', |
28 | | - marginInlineEnd: 'var(--mantine-spacing-xs)', |
29 | | - }, |
30 | | - description: colorWhite, |
31 | | - closeButton: colorWhite, |
32 | | - }, |
33 | | - }), |
34 | | - }, |
35 | | -}); |
36 | | - |
37 | 8 | document.body.append(tpl( |
38 | 9 | React.createElement(MantineProvider, { theme }, |
39 | 10 | React.createElement(Notifications, { position: 'bottom-left', zIndex: 99999 }), |
|
0 commit comments