m3e/skeleton
Skeleton is a visual placeholder that mimics the layout of content while it’s still loading.
This file was generated by m3e/generator
DO NOT EDIT
Types
Config is a public record for configuring this component.
pub type Config {
Config(
animation: skeleton_animation.SkeletonAnimation,
shape: skeleton_shape.SkeletonShape,
loaded: Loaded,
)
}
Constructors
-
Config( animation: skeleton_animation.SkeletonAnimation, shape: skeleton_shape.SkeletonShape, loaded: Loaded, )
Loaded is whether the content of the skeleton has been loaded.
pub type Loaded {
IsLoaded
IsNotLoaded
}
Constructors
-
IsLoaded -
IsNotLoaded
Values
pub fn animation(
record: Skeleton,
animation: skeleton_animation.SkeletonAnimation,
) -> Skeleton
animation sets the value of animation for this Skeleton.
pub const default_animation: skeleton_animation.SkeletonAnimation
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_loaded: Loaded
pub const default_shape: skeleton_shape.SkeletonShape
pub fn from_config(config: Config) -> Skeleton
from_config creates a new Skeleton from the given configuration.
pub fn loaded(record: Skeleton, loaded: Loaded) -> Skeleton
loaded sets the value of loaded for this Skeleton.
pub fn render(
model: Skeleton,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a Skeleton
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 Skeleton Config
pub fn shape(
record: Skeleton,
shape: skeleton_shape.SkeletonShape,
) -> Skeleton
shape sets the value of shape for this Skeleton.