m3e/tooltip
Tooltip is adds additional context to a button or other UI element.
This file was generated by m3e/generator
DO NOT EDIT
Types
Config is a public record for configuring this component.
pub type Config {
Config(
disabled: Disabled,
for: option.Option(String),
hide_delay: Float,
position: tooltip_position.TooltipPosition,
show_delay: Float,
touch_gestures: tooltip_touch_gestures.TooltipTouchGestures,
)
}
Constructors
-
Config( disabled: Disabled, for: option.Option(String), hide_delay: Float, position: tooltip_position.TooltipPosition, show_delay: Float, touch_gestures: tooltip_touch_gestures.TooltipTouchGestures, )
Disabled is whether the element is disabled.
pub type Disabled {
IsDisabled
IsNotDisabled
}
Constructors
-
IsDisabled -
IsNotDisabled
Tooltip is a View Model for this component
Fields:
- disabled: Whether the element is disabled.
- for: The identifier of the interactive control to which this element is attached.
- hide_delay: The amount of time, in milliseconds, before hiding the tooltip.
- position: The position of the tooltip.
- show_delay: The amount of time, in milliseconds, before showing the tooltip.
- touch_gestures: The mode in which to handle touch gestures.
pub opaque type Tooltip
Values
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_disabled: Disabled
pub const default_for: option.Option(String)
pub const default_hide_delay: Float
pub const default_position: tooltip_position.TooltipPosition
pub const default_show_delay: Float
pub const default_touch_gestures: tooltip_touch_gestures.TooltipTouchGestures
pub fn disabled(record: Tooltip, disabled: Disabled) -> Tooltip
disabled sets the value of disabled for this Tooltip.
pub fn for(
record: Tooltip,
for: option.Option(String),
) -> Tooltip
for sets the value of for for this Tooltip.
pub fn from_config(config: Config) -> Tooltip
from_config creates a new Tooltip from the given configuration.
pub fn hide_delay(record: Tooltip, hide_delay: Float) -> Tooltip
hide_delay sets the value of hide_delay for this Tooltip.
pub fn position(
record: Tooltip,
position: tooltip_position.TooltipPosition,
) -> Tooltip
position sets the value of position for this Tooltip.
pub fn render(
model: Tooltip,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a Tooltip
pub fn render_config(
c: Config,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render_config creates a Lustre Element from a Tooltip Config
pub fn show_delay(record: Tooltip, show_delay: Float) -> Tooltip
show_delay sets the value of show_delay for this Tooltip.
pub fn touch_gestures(
record: Tooltip,
touch_gestures: tooltip_touch_gestures.TooltipTouchGestures,
) -> Tooltip
touch_gestures sets the value of touch_gestures for this Tooltip.