basecoat-core 0.2.0

Core types, prop structs, and class-string functions for basecoat-rs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::{AttrMap, BasecoatProps, Children};
use std::borrow::Cow;

/// Label — maps to CSS class `.label`. No variants.
#[derive(BasecoatProps, Default, Clone, Debug)]
pub struct LabelProps {
    #[prop(optional, into)]
    pub class: Option<Cow<'static, str>>,
    /// `for` attribute linking to an input id.
    #[prop(optional, into)]
    pub r#for: Option<Cow<'static, str>>,
    #[prop(extend)]
    pub attrs: AttrMap,
    pub children: Children,
}