Files
xenia-pos-local/packages/ui/src/components/Sheet.jsx
T
bonaminandClaude Opus 5.5 b77bb8bb40 feat(ui): IconButton tones, Switch info slot, wide right sheet, PrintArea / PrintSheet
- IconButton tone=danger|warning|info|success|special|accent: a pastel button (soft background,
  ink icon) for row actions that stand apart.
- Switch info: an element (InfoTip) right after the label instead of after the switch.
- Sheet size=wide: a 600 px drawer.
- PrintArea: content rendered into <body>, hidden on screen, the only thing printed while mounted;
  PrintSheet: cards to cut out (dashed cut lines, never split across pages).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 14:48:50 +02:00

20 lines
628 B
React

import { cx } from '../internal/cx.js'
import { ModalFrame } from '../internal/ModalFrame.jsx'
/**
* A panel that slides in from the bottom (phones: action sheets, pickers) or the
* right (desktop: detail and edit panels). Same props and behaviour as Dialog.
* side: 'bottom' | 'right'
*/
export function Sheet({ side = 'bottom', size, className, ...props }) {
return (
<ModalFrame
{...props}
overlayClass={`x-overlay--${side}`}
panelClass={cx('x-sheet', `x-sheet--${side}`, size === 'wide' && 'x-sheet--wide', className)}
bodyClass="x-sheet__body"
grip={side === 'bottom'}
/>
)
}