import { h, Html } from 'lib/rx' interface Params { content: Html, onClose: () => void } export function view({ content, onClose }: Params): Html { return h('div', { className: 'g-Modal', onclick: () => onClose() }, h('div', { className: 'g-Modal__Content', onclick: (e: Event) => e.stopPropagation() }, h('button', { className: 'g-Modal__Close', onclick: () => onClose() }, '✖' ), content ) ) }