app: Add a component to delete a user

Also adds a way to hook to the bootstrap modals to show or hide them.
This commit is contained in:
Valentin Tolmer
2021-09-24 11:12:50 +02:00
committed by nitnelave
parent e8831f607b
commit 402ef2f83a
7 changed files with 253 additions and 24 deletions

View File

@@ -1,3 +1,4 @@
pub mod api;
pub mod cookies;
pub mod graphql;
pub mod modal;

16
app/src/infra/modal.rs Normal file
View File

@@ -0,0 +1,16 @@
use wasm_bindgen::prelude::*;
#[wasm_bindgen(module = "bootstrap")]
extern "C" {
#[wasm_bindgen]
pub type Modal;
#[wasm_bindgen(constructor)]
pub fn new(e: web_sys::Element) -> Modal;
#[wasm_bindgen(method)]
pub fn show(this: &Modal);
#[wasm_bindgen(method)]
pub fn hide(this: &Modal);
}