OrderNoteSheet
OrderNoteSheet edits a controlled note live in WCPOS v2's Order details sheet, with a customizable field label.
Import
import { OrderNoteSheet } from '@tallyui/components';Usage
import { useState } from 'react';
function NoteEditor() {
const [note, setNote] = useState('');
const [open, setOpen] = useState(true);
return open ? (
<OrderNoteSheet
value={note}
onChangeText={setNote}
onOpenChange={setOpen}
/>
) : null;
}This is WCPOS v2's Order details sheet, opening on the left so the cart's note row stays in view. It writes on every keystroke, and Close calls onOpenChange(false); Cart opens it for you when given noteSheet.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | required | Current note text |
onChangeText | (text: string) => void | required | Called on every edit with the untrimmed text |
onOpenChange | (open: boolean) => void | required | Called when the dialog requests an open state change; Close calls it with false |
label | string | 'Customer note' | The field's label and accessible name; the placeholder is "Add" plus the label in lower case |
CartNoteInput
CartNoteInput expands from an Add customer note link into a multiline customer note field, with controlled text, a customizable label and placeholder.
CartLineActions
CartLineActions wraps cart line content with pressable actions, each with a label, callback, and optional icon slot or text color.