import React from 'react' ; import { ModalInitialState , ModalStateReturn , useModalState , ModalState } from '../Modal' ; export type OverlayStateReturn = ModalStateReturn ; export type OverlayInitialState = ModalInitialState ; export function useOverlayState ( initialState ? ) { return useModalState ( { ... initialState , modal : false } ) ; } export function OverlayState ( props ) { const { children , ... restProps } = props ; return ( < ModalState { ... restProps } modal = { false } > { children } < /ModalState>); }