Module: features/infoboxes/infobox
Interfaces
BaseInfobox
• BaseInfobox: Object
The properties that are added onto a processed InfoboxOptions to create an Infobox.
Name | Type | Description |
---|---|---|
[Component] | GenericComponent | The Vue component used to render this feature. |
[GatherProps] | () => Record <string , unknown > | A function to gather the props the vue component requires for this feature. |
collapsed | Persistent <boolean > | Whether or not this infobox is collapsed. |
id | string | An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates. |
type | typeof InfoboxType | A 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.
Name | Type | Description |
---|---|---|
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. |
display | Computable <CoercableComponent > | The main text that appears in the display. |
style? | Computable <StyleValue > | CSS to apply to this feature. |
title | Computable <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
Name | Type |
---|---|
T | extends 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
Name | Type |
---|---|
T | extends InfoboxOptions |
Parameters
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T , BaseInfobox , GenericInfobox > | Infobox options. |
Returns
Infobox
<T
>
Defined in
profectus/src/features/infoboxes/infobox.ts:90
Components
Infobox Component
Props
Name | Type |
---|---|
visibility * | processedPropType<Visibility | boolean>(Number, Boolean) |
display * | processedPropType<CoercableComponent>(Object, String, Function) |
title * | processedPropType<CoercableComponent>(Object, String, Function) |
color | processedPropType<string>(String) |
collapsed * | Ref<boolean> |
style | processedPropType<StyleValue>(Object, String, Array) |
titleStyle | processedPropType<StyleValue>(Object, String, Array) |
bodyStyle | processedPropType<StyleValue>(Object, String, Array) |
classes | processedPropType<Record<string, boolean>>(Object) |
id * | string |