UNPKG

solid-modals

Version:

A container for handling modals and hamburger menus in SolidJS

22 lines (21 loc) 710 B
import { JSXElement } from "solid-js"; import { JSX } from "solid-js"; export interface Modal { modal?: JSX.Element; } export declare function useModal(): { showModal: (modal: JSX.Element) => void; clearModal: () => void; }; export declare function ModalRoot(): JSX.Element; export type modalBaseArgs = { onClear: () => void; outsideClose?: boolean; children: JSXElement; withAnimation?: boolean; }; export declare function ModalBase({ children, onClear, outsideClose: outsideClose, withAnimation }: modalBaseArgs): JSX.Element; export declare function ModalHamburger({ onClear, children }: { onClear: () => void; children: JSXElement; }): JSX.Element;