import { useContext } from 'react' import { ZIndexHardcodedContext, ZIndexStackContext } from './context' export const StackZIndexContext = ({ children, zIndex, }: { children: React.ReactNode zIndex?: number }) => { const existing = useContext(ZIndexStackContext) let content = ( {children} ) if (typeof zIndex !== 'undefined') { content = ( {content} ) } return content }