Tally UI

RegisterBar

Register status bar with a status pill and panel action

Import

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

Usage

<RegisterBar
  register={register}
  registerId={registerId}
  online={online}
  registerName="Front counter"
  multiRegister={true}
  onOpenPanel={() => setRegisterOpen(true)}
/>

Renders the register name for stores with multiple registers, a status pill when applicable, and a Register button when a session or last closure exists. Supplying onPressPill makes the pill a button.

Props

PropTypeDefaultDescription
registerReturnType<typeof useRegisterSession>requiredRegister session status, overdue and enabled state, closing state, and last closure
registerIdstring | nullrequiredBound register ID, or null when no register is chosen
onlinebooleanrequiredWhether the store and app can be reached; false is shown as offline
registerNamestring---Name shown when multiRegister is true and a register is bound
multiRegisterbooleanrequiredWhether the store has multiple registers and needs the register name displayed
onOpenPanel() => voidrequiredCalled when the Register panel button is pressed
onPressPill() => void---Makes the status pill a button and handles its press
classNamestring---Override status bar container styles

On this page