#Need to Map the Overlay Key Type with its Props

1 messages · Page 1 of 1 (latest)

harsh harborBOT
#
anmol_kansal#3386

Preview:```ts
//libs
import React, {
ComponentProps,
FunctionComponent,
useCallback,
useState,
} from 'react';

export const OverlaysProvider = <
OverlaysMap extends Record<string, FunctionComponent>,
OverlayKey extends keyof OverlaysMap,

({
overlaysMap,
children,
...```

vestal yoke
#

OverlaysMap will be sort of =

{
  CONFIRMATION_MODAL: ConfirmationModal,
  EDIT_DIALOG: EditDialog,
... 
 }
#

I want to bind the OverlayKey with respective component props