Skip to content

Commit 602677c

Browse files
Merge branch 'main' into fix/typings
2 parents 7d2d95b + 6fc6562 commit 602677c

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

example/yarn.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3195,9 +3195,9 @@ [email protected]:
31953195
node-int64 "^0.4.0"
31963196

31973197
buffer-from@^1.0.0:
3198-
version "1.1.1"
3199-
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
3200-
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
3198+
version "1.1.2"
3199+
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
3200+
integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
32013201

32023202
buffer-indexof@^1.0.0:
32033203
version "1.1.1"
@@ -7634,9 +7634,9 @@ mkdirp@^1.0.3, mkdirp@^1.0.4:
76347634
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
76357635

76367636
moment@^2.24.0, moment@^2.25.3:
7637-
version "2.29.2"
7638-
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.2.tgz#00910c60b20843bcba52d37d58c628b47b1f20e4"
7639-
integrity sha512-UgzG4rvxYpN15jgCmVJwac49h9ly9NurikMWGPdVxm8GZD6XjkKPxDTjQQ43gtGgnV3X0cAyWDdP2Wexoquifg==
7637+
version "2.29.4"
7638+
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
7639+
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==
76407640

76417641
move-concurrently@^1.0.1:
76427642
version "1.0.1"
@@ -10634,9 +10634,9 @@ source-map-resolve@^0.6.0:
1063410634
decode-uri-component "^0.2.0"
1063510635

1063610636
source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.19:
10637-
version "0.5.19"
10638-
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
10639-
integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
10637+
version "0.5.21"
10638+
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f"
10639+
integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==
1064010640
dependencies:
1064110641
buffer-from "^1.0.0"
1064210642
source-map "^0.6.0"
@@ -11112,9 +11112,9 @@ terser-webpack-plugin@^1.4.3:
1111211112
worker-farm "^1.7.0"
1111311113

1111411114
terser@^4.1.2, terser@^4.6.2, terser@^4.6.3:
11115-
version "4.8.0"
11116-
resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17"
11117-
integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==
11115+
version "4.8.1"
11116+
resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.1.tgz#a00e5634562de2239fd404c649051bf6fc21144f"
11117+
integrity sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==
1111811118
dependencies:
1111911119
commander "^2.20.0"
1112011120
source-map "~0.6.1"

src/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ type NiceModalArgs<T> = T extends keyof JSX.IntrinsicElements | React.JSXElement
212212
? Omit<React.ComponentProps<T>, 'id'>
213213
: Record<string, unknown>;
214214

215-
export function show<T extends any, P extends any>(modal: React.FC<P>, args?: NiceModalArgs<React.FC<P>>): Promise<T>;
215+
export function show<T extends any, C extends React.FC>(modal: C, args?: Omit<React.ComponentProps<C>, 'id'>): Promise<T>;
216216
export function show<T extends any>(modal: string, args?: Record<string, unknown>): Promise<T>;
217217
export function show<T extends any, P extends any>(modal: string, args: P): Promise<T>;
218218
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
@@ -549,7 +549,7 @@ export const bootstrapDialog = (
549549
};
550550
};
551551

552-
export default {
552+
const NiceModal = {
553553
Provider,
554554
ModalDef,
555555
NiceModalContext,
@@ -565,3 +565,5 @@ export default {
565565
muiDialog,
566566
bootstrapDialog,
567567
};
568+
569+
export default NiceModal;

0 commit comments

Comments
 (0)