eBay / nice-modal-react

A modal state manager for React.
https://ebay.github.io/nice-modal-react
MIT License
1.96k stars 109 forks source link

fix README #137

Closed mokeyjay closed 7 months ago

mokeyjay commented 7 months ago

fix demo in README, otherwise an error will be reported

No overload matches this call.
  Overload 1 of 3, '(modal: FC<NiceModalHocProps>, args?: Partial<NiceModalHocProps & { children?: ReactNode; }>): Promise<unknown>', gave the following error.
    Argument of type '{ name: any; }' is not assignable to parameter of type 'Partial<NiceModalHocProps & { children?: ReactNode; }>'.
      Object literal may only specify known properties, and 'name' does not exist in type 'Partial<NiceModalHocProps & { children?: ReactNode; }>'.
  Overload 2 of 3, '(modal: string, args?: Record<string, unknown>): Promise<unknown>', gave the following error.
    Argument of type 'FC<NiceModalHocProps>' is not assignable to parameter of type 'string'.
  Overload 3 of 3, '(modal: string, args: { name: any; }): Promise<unknown>', gave the following error.
    Argument of type 'FC<NiceModalHocProps>' is not assignable to parameter of type 'string'.