Skip to main content

empty_view

Function empty_view 

Source
pub fn empty_view<Msg: Clone + 'static>(
    icon: Icon,
    title: impl Into<String>,
    description: Option<&str>,
    palette: &EmptyPalette,
) -> View<Msg>
Expand description

Construye el empty state. La app llama desde su view() cuando detecta el caso vacío:

if model.items.is_empty() {
    return empty_view(Icon::File, "Sin archivos abiertos",
                      Some("Abrí uno con Ctrl+O para empezar."),
                      &palette);
}