wip: pass more events
This commit is contained in:
1 parent
47d0f51e00
commit
0dad91bc08
20 files changed
+773
-31
No files matched your search
@@ -1,6 +1,6 @@
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
use dioxus::events::MouseEvent;
|
||||
use dioxus::events::MouseData;
|
||||
use dioxus::prelude::*;
|
||||
|
||||
fn main() {
|
||||
@@ -20,7 +20,7 @@ fn App(cx: Scope) -> Element {
|
||||
// ANCHOR: component_with_handler
|
||||
#[derive(Props)]
|
||||
pub struct FancyButtonProps<'a> {
|
||||
on_click: EventHandler<'a, MouseEvent>,
|
||||
on_click: EventHandler<'a, MouseData>,
|
||||
}
|
||||
|
||||
pub fn FancyButton<'a>(cx: Scope<'a, FancyButtonProps<'a>>) -> Element<'a> {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// ANCHOR: all
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
use dioxus::events::FormEvent;
|
||||
use dioxus::events::FormData;
|
||||
use dioxus::prelude::*;
|
||||
|
||||
fn main() {
|
||||
@@ -83,7 +83,7 @@ fn Meme<'a>(cx: Scope<'a>, caption: &'a str) -> Element<'a> {
|
||||
fn CaptionEditor<'a>(
|
||||
cx: Scope<'a>,
|
||||
caption: &'a str,
|
||||
on_input: EventHandler<'a, FormEvent>,
|
||||
on_input: EventHandler<'a, FormData>,
|
||||
) -> Element<'a> {
|
||||
let input_style = r"
|
||||
border: none;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// ANCHOR: all
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
use dioxus::events::FormEvent;
|
||||
use dioxus::events::FormData;
|
||||
use dioxus::prelude::*;
|
||||
|
||||
fn main() {
|
||||
@@ -150,7 +150,7 @@ fn Meme<'a>(cx: Scope<'a>, caption: &'a str) -> Element<'a> {
|
||||
fn CaptionEditor<'a>(
|
||||
cx: Scope<'a>,
|
||||
caption: &'a str,
|
||||
on_input: EventHandler<'a, FormEvent>,
|
||||
on_input: EventHandler<'a, FormData>,
|
||||
) -> Element<'a> {
|
||||
let is_dark_mode = use_is_dark_mode(&cx);
|
||||
|
||||
|
||||
Reference in new issue
Block a user