mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-24 09:58:21 +03:00
14 lines
390 B
TypeScript
14 lines
390 B
TypeScript
import { useToggle } from '@shlinkio/shlink-frontend-kit';
|
|
import type { FC, ReactElement } from 'react';
|
|
|
|
interface RenderModalArgs {
|
|
isOpen: boolean;
|
|
toggle: () => void;
|
|
}
|
|
|
|
export const TestModalWrapper: FC<{ renderModal: (args: RenderModalArgs) => ReactElement }> = (
|
|
{ renderModal },
|
|
) => {
|
|
const [isOpen, toggle] = useToggle(true);
|
|
return renderModal({ isOpen, toggle });
|
|
};
|