composure_macros 0.2.0

Procedural macros for Composure Discord bots: #[command], #[app], #[view] and rsx! markup
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use composure::{
    command::{Ephemeral, ModalView},
    rsx, view,
};

#[view]
fn Form() -> ModalView {
    rsx! {
        <Modal title="Form" on:submit:send={|_ctx, name: String, age: String| Ephemeral(format!("{name} {age}"))}>
            <Label text="Name"><TextInput name="name"/></Label>
        </Modal>
    }
}

fn main() {}