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