azul-widgets 0.0.2

Builtin widgets for the Azul GUI framework (buttons, checkboxes, labels, etc.)
Documentation
use azul_core::{
    dom::{Dom, DomString},
};

#[derive(Debug, Clone, Hash, PartialEq, Eq)]
pub struct Label {
    pub text: DomString,
}

impl Label {

    #[inline]
    pub fn new<S: Into<DomString>>(text: S) -> Self {
        Self { text: text.into() }
    }

    #[inline]
    pub fn dom(self) -> Dom {
        Dom::label(self.text).with_class("__azul-native-label")
    }
}