import { css, on, type Handle } from '@remix-run/ui' import { Button } from '@remix-run/ui/button' import { Glyph } from '@remix-run/ui/glyph' import * as popover from '@remix-run/ui/popover' import { Option, Select } from '@remix-run/ui/select' import { theme } from '@remix-run/ui/theme' /** * @name Popover Overview * @description A popover panel anchored to a trigger button, containing form controls and a close action. * @layout center */ export default function Example(handle: Handle) { let open = false function closePopover() { open = false void handle.update() } return () => (
) } const buttonRowCss = css({ display: 'flex', justifyContent: 'flex-start', }) const panelCss = css({ display: 'grid', gap: theme.space.md, width: '22rem', padding: theme.space.lg, }) const fieldCss = css({ display: 'grid', gap: theme.space.px, }) const labelCss = css({ margin: 0, fontSize: theme.fontSize.xs, fontWeight: theme.fontWeight.semibold, color: theme.colors.text.primary, }) const fieldSelectCss = css({ width: '100%', }) const actionsCss = css({ display: 'flex', justifyContent: 'flex-end', paddingTop: theme.space.xs, })