- 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>
20 lines
628 B
React
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'}
|
|
/>
|
|
)
|
|
}
|