Tally UI

RegisterPicker

Register selection card listing the store's registers

Import

import { RegisterPicker } from '@tallyui/components';

Usage

<RegisterPicker
  registers={[
    { id: 'front', name: 'Front counter' },
    { id: 'back', name: 'Back counter' },
  ]}
  onPick={(id) => bindRegister(id)}
/>

Renders a Choose a register card with a scrollable list of register buttons, each labeled “Not opened”. Selecting one calls onPick so the app can bind the till; an empty list shows a message that no registers are set up.

Props

PropTypeDefaultDescription
registersRegisterPickerRegister[]requiredThe app's list of registers for the store
onPick(id: string) => voidrequiredCalled with the selected register's ID
classNamestring---Styles passed to the containing card

RegisterPickerRegister

interface RegisterPickerRegister {
  id: string;
  name: string;
}