import { h, Component, ComponentChildren } from 'preact'; import './modal.scss'; interface Props { show: boolean; children: ComponentChildren; } export class Modal extends Component { constructor(props: Props) { super(props); } render({ show, children }: Props) { return ( show && (
{children}
) ); } }