MCPcopy Create free account
hub / github.com/angular-rust/ux-components / with_label

Method with_label

src/rendering/backend/native/button.rs:50–63  ·  view source on GitHub ↗
(text: &str)

Source from the content-addressed store, hash-verified

48 }
49
50 pub fn with_label(text: &str) -> Self {
51 let mut props = ButtonProps::default();
52 if !text.is_empty() {
53 props.text = Some(text.into())
54 }
55
56 let component = Self {
57 props: RefCell::new(props),
58 inner: Widget::new(),
59 };
60
61 component.init();
62 component
63 }
64
65 pub fn with_icon(name: &str) -> Self {
66 let mut props = ButtonProps::default();

Callers

nothing calls this directly

Calls 1

initMethod · 0.45

Tested by

no test coverage detected