open-vault/ui/lib/core/stories/ttl-picker.md

1.5 KiB

TtlPicker

TtlPicker components are used to expand and collapse content with a toggle.

Param Type Default Description
labelClass String "" A CSS class to add to the label.
labelText String "TTL" The text content of the label associated with the widget.
initialValue Number The starting value of the TTL;
setDefaultValue Boolean true If true, the component will trigger onChange on the initial render, causing a value to be set.
onChange function Function.prototype The function to call when the value of the ttl changes.
outputSeconds Boolean false If true, the component will trigger onChange with a value converted to seconds instead of a Golang duration string.

Example

    <TtlPicker @labelText="Lease" @initialValue={{lease}} @onChange={{action (mut lease)}} />

See