Skip to main content

Interface: G3XNumberUnitDisplayProps<F>

Component props for G3XNumberUnitDisplay.

Type parameters

NameType
Fextends string

Hierarchy

  • NumberUnitDisplayProps<F>

    G3XNumberUnitDisplayProps

Properties

children

Optional children: DisplayChildren[]

The children of the display component.

Inherited from

NumberUnitDisplayProps.children

Defined in

src/sdk/components/FSComponent.ts:122


class

Optional class: string | ToggleableClassNameRecord | SubscribableSet<string>

CSS class(es) to add to the root of the icon component.

Inherited from

NumberUnitDisplayProps.class

Defined in

src/garminsdk/components/common/NumberUnitDisplay.tsx:27


displayUnit

displayUnit: null | Unit<F> | Subscribable<null | Unit<F>>

The unit type in which to display the value, or a subscribable which provides it. If the unit is null, then the native type of the value is used instead.

Inherited from

NumberUnitDisplayProps.displayUnit

Defined in

src/sdk/components/common/AbstractNumberUnitDisplay.tsx:18


formatter

formatter: (number: number) => string

A function which formats numbers.

Type declaration

▸ (number): string

A function which formats numbers.

Parameters
NameType
numbernumber
Returns

string

Inherited from

NumberUnitDisplayProps.formatter

Defined in

src/garminsdk/components/common/NumberUnitDisplay.tsx:13


hideUnitWhenNaN

Optional hideUnitWhenNaN: boolean

Whether to hide the unit text when the displayed value is equal to NaN. Defaults to false.

Inherited from

NumberUnitDisplayProps.hideUnitWhenNaN

Defined in

src/garminsdk/components/common/NumberUnitDisplay.tsx:24


ref

Optional ref: NodeReference<any>

A reference to the display component.

Inherited from

NumberUnitDisplayProps.ref

Defined in

src/sdk/components/FSComponent.ts:125


unitFormatter

Optional unitFormatter: (out: [string, string], unit: Unit<F>, number: number) => void

A function which formats units. The formatted unit text should be written to the 2-tuple passed to the out parameter, as [bigText, smallText]. bigText and smallText will be rendered into separate <span> elements representing the big and small components of the rendered unit text, respectively. If not defined, then units will be formatted based on the text generated by the UnitFormatter class.

Type declaration

▸ (out, unit, number): void

A function which formats units. The formatted unit text should be written to the 2-tuple passed to the out parameter, as [bigText, smallText]. bigText and smallText will be rendered into separate <span> elements representing the big and small components of the rendered unit text, respectively. If not defined, then units will be formatted based on the text generated by the UnitFormatter class.

Parameters
NameType
out[string, string]
unitUnit<F>
numbernumber
Returns

void

Inherited from

NumberUnitDisplayProps.unitFormatter

Defined in

src/garminsdk/components/common/NumberUnitDisplay.tsx:21


useBasicUnitFormat

Optional useBasicUnitFormat: boolean

Whether to use basic unit text formatting instead of G3X-style unit text formatting. Ignored if unitFormatter is defined. Defaults to false.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/Common/G3XNumberUnitDisplay.tsx:17


useVsArrows

Optional useVsArrows: boolean

Whether to format unit text with up and down vertical speed arrows for supported unit types. Ignored if unitFormatter is defined or useStandardUnitFormat is true. Defaults to false.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/Common/G3XNumberUnitDisplay.tsx:23


value

value: NumberUnitInterface<F, Unit<F>> | Subscribable<NumberUnitInterface<F, Unit<F>>>

The NumberUnitInterface value to display, or a subscribable which provides it.

Inherited from

NumberUnitDisplayProps.value

Defined in

src/sdk/components/common/AbstractNumberUnitDisplay.tsx:12