Skip to content
On this page

Module: features/infoboxes/infobox

Interfaces

BaseInfobox

BaseInfobox: Object

The properties that are added onto a processed InfoboxOptions to create an Infobox.

NameTypeDescription
[Component]GenericComponentThe Vue component used to render this feature.
[GatherProps]() => Record<string, unknown>A function to gather the props the vue component requires for this feature.
collapsedPersistent<boolean>Whether or not this infobox is collapsed.
idstringAn auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
typetypeof InfoboxTypeA symbol that helps identify features of the same type.

Defined in

profectus/src/features/infoboxes/infobox.ts:50


InfoboxOptions

InfoboxOptions: Object

An object that configures an Infobox.

NameTypeDescription
bodyStyle?Computable<StyleValue>CSS to apply to the body of the infobox.
classes?Computable<Record<string, boolean>>Dictionary of CSS classes to apply to this feature.
color?Computable<string>The background color of the Infobox.
displayComputable<CoercableComponent>The main text that appears in the display.
style?Computable<StyleValue>CSS to apply to this feature.
titleComputable<CoercableComponent>A header to appear at the top of the display.
titleStyle?Computable<StyleValue>CSS to apply to the title of the infobox.
visibility?Computable<boolean | Visibility>Whether this clickable should be visible.

Defined in

profectus/src/features/infoboxes/infobox.ts:28

Type Aliases

GenericInfobox

Ƭ GenericInfobox: Replace<Infobox<InfoboxOptions>, { visibility: ProcessedComputable<Visibility | boolean> }>

A type that matches any valid Infobox object.

Defined in

profectus/src/features/infoboxes/infobox.ts:79


Infobox

Ƭ Infobox<T>: Replace<T & BaseInfobox, { bodyStyle: GetComputableType<T["bodyStyle"]> ; classes: GetComputableType<T["classes"]> ; color: GetComputableType<T["color"]> ; display: GetComputableType<T["display"]> ; style: GetComputableType<T["style"]> ; title: GetComputableType<T["title"]> ; titleStyle: GetComputableType<T["titleStyle"]> ; visibility: GetComputableTypeWithDefault<T["visibility"], Visible> }>

An object that represents a feature that displays information in a collapsible way.

Type parameters

NameType
Textends InfoboxOptions

Defined in

profectus/src/features/infoboxes/infobox.ts:64

Variables

InfoboxType

Const InfoboxType: typeof InfoboxType

A symbol used to identify Infobox features.

Defined in

profectus/src/features/infoboxes/infobox.ts:23

Functions

createInfobox

createInfobox<T>(optionsFunc): Infobox<T>

Lazily creates an infobox with the given options.

Type parameters
NameType
Textends InfoboxOptions
Parameters
NameTypeDescription
optionsFuncOptionsFunc<T, BaseInfobox, GenericInfobox>Infobox options.
Returns

Infobox<T>

Defined in

profectus/src/features/infoboxes/infobox.ts:90

Components

Infobox Component

Props

NameType
visibility*processedPropType<Visibility | boolean>(Number, Boolean)
display*processedPropType<CoercableComponent>(Object, String, Function)
title*processedPropType<CoercableComponent>(Object, String, Function)
colorprocessedPropType<string>(String)
collapsed*Ref<boolean>
styleprocessedPropType<StyleValue>(Object, String, Array)
titleStyleprocessedPropType<StyleValue>(Object, String, Array)
bodyStyleprocessedPropType<StyleValue>(Object, String, Array)
classesprocessedPropType<Record<string, boolean>>(Object)
id*string