Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface InfoPanelOptions

A data type that represents the configuration options for an info panel.

Hierarchy

Index

Properties

account

account: Account

The AerisWeather account instance used for configuring API data requests.

Optional className

className: string

CSS class name to add to the view's element.

Optional enabled

enabled: boolean

A Boolean indicating whether the panel is enabled. If false, then the panel will not be rendered. Default value is true.

Optional icon

icon: string

Icon HTML to display in the button when the panel is collapsed. This value can be any valid HTML, including an <img> or <svg> element.

Optional id

id: string

Unique identifier.

Optional metric

metric: boolean

A Boolean value indicating whether the data displayed in the info panel should use metric units where applicable.

Default value is false.

Optional renderer

renderer: Function | string

Renderer for the view, which can either be an HTML string or a function that receives the view's data, if any, and returns the final HTML string to render as the view's content.

Optional requiresData

requiresData: boolean

A Boolean value that indicates whether the view requires valid data to be provided in order for it to be rendered. When this value is true and there is no data provided, then the view will be rendered as empty.

Default value is false.

sections

sections: {}

View section configurations keyed by section view identifier.

View sections represent data for a single data type and are used within content views when rendering within an info panel.

Type declaration

Optional title

title: string

Panel title, which is displayed when a toggleable panel is expanded.

Optional toggleable

toggleable: boolean

A Boolean indicating whether the panel is toggleable. Default value is false.

Optional ui

ui: {}

An object that defines the CSS selectors for various UI elements in the view and their reference keys. When a view has been rendered and added to the DOM, you can reference and access these UI targets using this.ui.#key#, where #key# is the key used with this object.

Type declaration

  • [key: string]: string

views

views: {}

Content view configurations keyed by view identifier.

Content views contain one or more section views and are used when displaying content within an info panel instance.

Type declaration

Generated using TypeDoc