Files
mize/parts/mize.ui/dioxus-components/src/components/label/component.rs
2026-11-01 14:49:38 +01:00

27 lines
592 B
Rust

use dioxus::prelude::*;
use dioxus_primitives::label::{self, LabelProps};
const STYLE: &str = r#".dx-label {
display: flex;
align-items: center;
color: var(--text-2);
font-size: 0.75rem;
font-weight: 500;
letter-spacing: 0.01em;
line-height: 1.2;
}
"#;
#[component]
pub fn Label(props: LabelProps) -> Element {
rsx! {
crate::OnceStyle { href: "dioxus-components/label", css: STYLE }
label::Label {
class: "dx-label",
html_for: props.html_for,
attributes: props.attributes,
{props.children}
}
}
}