Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TS support #17

Open
alexanderkhivrych opened this issue Sep 9, 2022 · 1 comment
Open

Add TS support #17

alexanderkhivrych opened this issue Sep 9, 2022 · 1 comment
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@alexanderkhivrych
Copy link
Owner

alexanderkhivrych commented Sep 9, 2022

I will add ts support

@alexanderkhivrych alexanderkhivrych added the good first issue Good for newcomers label Sep 9, 2022
@alexanderkhivrych alexanderkhivrych self-assigned this Sep 9, 2022
@alexanderkhivrych alexanderkhivrych added the help wanted Extra attention is needed label Dec 18, 2022
@RobertRad
Copy link

I created this in my project:

declare module 'use-modal-hook' {
  export function useModal<T>(component: FC<T>, props: Partial<T>): [(modalData: Partial<T>) => void, () => void];

  export const ModalContext: React.Context<{
    showModal: (modalKey: string, component: FC<T>, modalData: Partial<T>) => void;
    hideModal: (modalKey: string, onClose: () => void) => void;
    isOpenedModal: boolean;
  }>;

  export const ModalProvider: FC<PropsWithChildren>;
}

You could revise and use them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants