import * as menu from '@remix-run/ui/menu' import { css } from 'remix/component' export default function ExampleMenu() { return () => (
Undo
Redo
Cut
Copy
Paste
) } function ChevronDownIcon() { return () => ( ) } const styles = { theme: css({ '--text': 'light-dark(#202027, #eeeef2)', '--border': 'light-dark(#e0e0e6, #393940)', colorScheme: 'light dark', '&, & *, &::before, &::after, & *::before, & *::after': { boxSizing: 'border-box', }, color: 'var(--text)', font: '14px/1.6 "Inter Variable", Inter, ui-sans-serif, system-ui, sans-serif', }), item: css({ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '20px', padding: '9px 12px', borderRadius: '6px', outline: 0, cursor: 'default', '&[data-highlighted]': { background: 'light-dark(#eeeef3, #303038)', }, '&[data-menu-flash]': { background: 'light-dark(#dedee7, #454550)', color: 'light-dark(#202027, #eeeef2)', }, '&[aria-disabled]': { opacity: 0.4, }, }), root: css({ width: 'fit-content', maxWidth: '100%', }), trigger: css({ display: 'inline-flex', alignItems: 'center', justifyContent: 'center', gap: '8px', padding: '9px 14px', border: '1px solid light-dark(#d8d8df, #44444c)', borderRadius: '8px', background: 'light-dark(#fff, #25252b)', color: 'inherit', font: 'inherit', fontWeight: 600, cursor: 'pointer', '&:hover:not(:disabled)': { background: 'light-dark(#f0f0f5, #303038)', }, '&:focus-visible': { outline: '2px solid light-dark(#70707c, #a0a0ac)', outlineOffset: '3px', }, '&:disabled': { opacity: 0.45, cursor: 'not-allowed', }, }), popover: css({ margin: 0, padding: '6px', minWidth: '220px', maxWidth: 'calc(100vw - 32px)', border: '1px solid var(--border)', borderRadius: '10px', background: 'light-dark(#fff, #1b1b20)', boxShadow: '0 12px 32px #00000024', opacity: 0, transition: 'opacity 140ms ease', '&[data-close-animation="none"]': { transition: 'none', }, '&[data-state="open"]': { opacity: 1, '@starting-style': { opacity: 0, }, }, '@media (prefers-reduced-motion: reduce)': { transition: 'none', }, }), list: css({ display: 'grid', gap: '2px', maxHeight: '240px', overflow: 'auto', outline: 0, }), separator: css({ height: '1px', margin: '4px 6px', background: 'var(--border)', }), }