Skip to content

Commit bfa912d

Browse files
authored
Merge pull request #653 from BSd3v/custom-component-helper
expose `MantineHooks` and `MantineCore` for use with custom components
2 parents 3f98399 + c3d45b2 commit bfa912d

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
### Added
66
- Added `TableOfContents` component #513 by @deadkex
77

8+
- Exposed Mantine Core, Mantine Hooks, and Mantine Dates on the global window object for use in custom Dash
9+
components. This enables building custom Dash components that depend on Mantine components or hooks while remaining
10+
compatible with Dash Mantine Components. #653 by @BSd3v
11+
812
### Fixed
913
- Fixed `PinInput` so that `value` can be set initially and in a callback. #684 by @AnnMarieW
1014

dash_mantine_components/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
package_name = package["name"].replace(" ", "_").replace("-", "_")
3232
__version__ = package["version"]
33+
mantine_version = package['dependencies']['@mantine/core']
3334

3435
_current_path = _os.path.dirname(_os.path.abspath(__file__))
3536

src/ts/components/styles/MantineProvider.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ import {
33
MantineProviderProps,
44
} from '@mantine/core';
55
import React from 'react';
6+
import * as MantineCore from '@mantine/core';
7+
import * as MantineHooks from '@mantine/hooks';
8+
import * as MantineDates from '@mantine/dates';
9+
10+
(window as any).MantineCore = MantineCore;
11+
(window as any).MantineHooks = MantineHooks;
12+
(window as any).MantineDates = MantineDates;
613

714
import '@mantine/core/styles.css';
815

0 commit comments

Comments
 (0)