🟢 Doesn't need container
🟢 Accepts child/children
pub fn fa_modal<'a>(builder: &'a mut FamiqWidgetBuilder) -> FaModalBuilder<'a> {
// ..
}
let modal = fa_modal(&mut builder).build();
pub struct FaModalState;
-
FaModalState can be used to show and hide specific modal by either id or entity.
show_by_id: show modal by id.
show_by_entity: show modal by entity.
hide_by_id: hide modal by id.
hide_by_entity: hide modal by entity.
fn my_system(mut modal_state: ResMut<FaModalState>) {
// some logic ..
// show modal
modal_state.show_by_id("#modal-id");
// hide modal
modal_state.hide_by_id("#modal-id");
}