Skip to content

Commit 6cd83cf

Browse files
committed
Bring back old show
1 parent 630d5f5 commit 6cd83cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ const getModalId = (modal: string | React.FC<any>): string => {
211211
type NiceModalArgs<T> = T extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>
212212
? Partial<Omit<React.ComponentProps<T>, 'id'>>
213213
: Record<string, unknown>;
214-
215-
export function show<T extends any, C extends React.FC>(modal: C, args?: Omit<React.ComponentProps<C>, 'id'>): Promise<T>;
214+
export function show<T extends any>(modal: React.FC<any>, args?: NiceModalArgs<React.FC<any>>): 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
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
218218
export function show(modal: React.FC<any> | string, args?: NiceModalArgs<React.FC<any>> | Record<string, unknown>) {

0 commit comments

Comments
 (0)