Class: TimeDisplay
Displays time in HH:MM:SS format.
Hierarchy
DisplayComponent
<TimeDisplayProps
>↳
TimeDisplay
Constructors
constructor
• new TimeDisplay(props
): TimeDisplay
Creates an instance of a DisplayComponent.
Parameters
Name | Type | Description |
---|---|---|
props | TimeDisplayProps | The propertis of the component. |
Returns
Inherited from
DisplayComponent<TimeDisplayProps>.constructor
Defined in
src/sdk/components/FSComponent.ts:73
Properties
context
• Optional
context: [] = undefined
The context on this component, if any.
Inherited from
DisplayComponent.context
Defined in
src/sdk/components/FSComponent.ts:64
contextType
• Optional
Readonly
contextType: readonly [] = undefined
The type of context for this component, if any.
Inherited from
DisplayComponent.contextType
Defined in
src/sdk/components/FSComponent.ts:67
props
• props: TimeDisplayProps
& ComponentProps
The properties of the component.
Inherited from
DisplayComponent.props
Defined in
src/sdk/components/FSComponent.ts:61
Methods
destroy
▸ destroy(): void
Returns
void
Inherit Doc
Overrides
DisplayComponent.destroy
Defined in
src/garminsdk/components/common/TimeDisplay.tsx:174
getContext
▸ getContext(context
): never
Gets a context data subscription from the context collection.
Parameters
Name | Type | Description |
---|---|---|
context | never | The context to get the subscription for. |
Returns
never
The requested context.
Throws
An error if no data for the specified context type could be found.
Inherited from
DisplayComponent.getContext
Defined in
src/sdk/components/FSComponent.ts:106
getSuffix
▸ getSuffix(format
, isAm
): string
Gets the suffix to append to the time display.
Parameters
Name | Type | Description |
---|---|---|
format | TimeDisplayFormat | The format of the time display. |
isAm | boolean | Whether or not the current time is AM. |
Returns
string
The time display suffix.
Defined in
src/garminsdk/components/common/TimeDisplay.tsx:157
onAfterRender
▸ onAfterRender(): void
Returns
void
Inherit Doc
Overrides
DisplayComponent.onAfterRender
Defined in
src/garminsdk/components/common/TimeDisplay.tsx:102
onBeforeRender
▸ onBeforeRender(): void
A callback that is called before the component is rendered.
Returns
void
Inherited from
DisplayComponent.onBeforeRender
Defined in
src/sdk/components/FSComponent.ts:80
render
▸ render(): VNode
Returns
VNode
Inherit Doc
Overrides
DisplayComponent.render
Defined in
src/garminsdk/components/common/TimeDisplay.tsx:162
updateDisplayedTime
▸ updateDisplayedTime(): void
Updates the displayed time.
Returns
void
Defined in
src/garminsdk/components/common/TimeDisplay.tsx:115
DEFAULT_SUFFIX_FORMATTER
▸ DEFAULT_SUFFIX_FORMATTER(format
, isAm
): string
A function which formats suffixes for TimeDisplay.
Parameters
Name | Type | Description |
---|---|---|
format | TimeDisplayFormat | The current format used to display the time. |
isAm | boolean | Whether or not the current time is AM. |
Returns
string
The suffix to append to the displayed time.
Defined in
src/garminsdk/components/common/TimeDisplay.tsx:63