Interface: PriceToggleProps
Defined in: components/PriceToggle.tsx:11
Properties
className?
optionalclassName?:string
Defined in: components/PriceToggle.tsx:45
Extra CSS class applied to the root element.
inclExclVatSwitched?
optionalinclExclVatSwitched?: (on) =>void
Defined in: components/PriceToggle.tsx:42
Parameters
on
boolean
Returns
void
Deprecated
Use onChange instead. Alias kept for back-compat with
existing call sites; receives the same boolean as onChange.
initialState?
optionalinitialState?:boolean
Defined in: components/PriceToggle.tsx:36
Uncontrolled mode: initial state of the toggle.
Ignored when value is supplied (controlled mode).
Defaults to true (incl. VAT).
label?
optionallabel?:string
Defined in: components/PriceToggle.tsx:16
Label text shown beside the toggle. Defaults to 'Prices:'.
labels?
optionallabels?:Record<string,string>
Defined in: components/PriceToggle.tsx:49
Translated labels keyed by the slugs used inside the component
(pricesLabel, inclVat, exclVat). Missing keys fall back to English.
onChange?
optionalonChange?: (on) =>void
Defined in: components/PriceToggle.tsx:29
Controlled mode: notified on every flip with the new state.
Required when value is supplied. Optional otherwise (uncontrolled).
Parameters
on
boolean
Returns
void
value?
optionalvalue?:boolean
Defined in: components/PriceToggle.tsx:23
Controlled mode: current on/off state (true = incl. VAT).
When supplied, the component does not own its state — the parent does.
Pair with onChange to receive flips.