azul_widgets/label.rs
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")
}
}