StoreSettingsChoiceScreen
Ask which region, country and sales channel a till sells in when the store's settings need a choice.
Import
import { StoreSettingsChoiceScreen } from '@tallyui/components';Usage
<StoreSettingsChoiceScreen choices={error.choices} initial={storedChoice}
onSubmit={(choice) => saveChoiceAndRetry(choice)} />Show this screen when storeSettings rejects with choice_required. The app persists the returned choice per store and calls storeSettings again with it. Only the sections present in choices are shown. A section with one option starts selected; otherwise a matching initial value is pre-selected. Continue stays disabled until every shown section has a choice. The submitted choice lower-cases the country code and keeps initial values for sections that are not shown.
Props
StoreSettingsChoiceScreenProps extends the React Native ViewProps, without children.
| Prop | Type | Default | Description |
|---|---|---|---|
choices | StoreSettingsChoices | required | From StoreSettingsError.choices; optional regions, countries and channels |
initial | StoreSettingsChoice | — | A previous choice to pre-select; fields not in choices are ignored |
onSubmit | (choice: StoreSettingsChoice) => void | required | Called with the full choice when the user confirms |
countryName | (code: string) => string | Intl.DisplayNames in locale | Display name for an ISO 3166-1 alpha-2 code; falls back to the upper-cased code |
locale | string | 'en' | Locale of the default country names |
title | string | 'Set up this till' | Screen title |
body | string | 'This store sells in more than one place. Choose where this till is.' | Text under the title |
regionLabel | string | 'Region' | Heading of the region section |
countryLabel | string | 'Country' | Heading of the country section |
channelLabel | string | 'Sales channel' | Heading of the channel section |
submitLabel | string | 'Continue' | Label of the submit button |
className | string | — | Extra classes for the outer view |
LiveTabScreen
Show what a browser tab draws once it is no longer the live POS tab, with a button to take over or reload.
ScaleProvider
ScaleProvider picks the UI scale step from the stored ui.scale setting and the window size, and hands its size tokens to the components below it; useScale reads them and usePointer reports a coarse or fine pointer.