sepal_ui.sepalwidgets.widget.StateIcon#
- class sepal_ui.sepalwidgets.widget.StateIcon(**kwargs)[source]#
Custom icon with multiple state colors.
- Parameters:
model (Model | None) – Model to manage StateIcon behaviour from outside.
model_trait (str) – Name of trait to be linked with state icon. Must exists in model.
states (dict) – Dictionary where keys are the state name to be linked with self value and value represented by a tuple of two elements. {“key”:(tooltip_msg, color)}.
kwargs – Any arguments from a v.Tooltip
Attributes
states
(tooltip_msg, color)}.
values
key name of the current state of component.
icon
The colored Icon of the tooltip
Methods
Custom icon with multiple state colors.
- StateIcon.__init__(model=None, model_trait='', states={}, **kwargs)[source]#
Custom icon with multiple state colors.
- Parameters:
model (Model | None) – Model to manage StateIcon behaviour from outside.
model_trait (str) – Name of trait to be linked with state icon. Must exists in model.
states (dict) – Dictionary where keys are the state name to be linked with self value and value represented by a tuple of two elements. {“key”:(tooltip_msg, color)}.
kwargs – Any arguments from a v.Tooltip