25 lines
492 B
Rust
25 lines
492 B
Rust
use dioxus_core::Event;
|
|
|
|
pub type AnimationEvent = Event<AnimationData>;
|
|
|
|
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
|
|
#[derive(Debug, Clone, PartialEq)]
|
|
pub struct AnimationData {
|
|
pub animation_name: String,
|
|
pub pseudo_element: String,
|
|
pub elapsed_time: f32,
|
|
}
|
|
|
|
impl_event! [
|
|
AnimationData;
|
|
|
|
/// onanimationstart
|
|
onanimationstart
|
|
|
|
/// onanimationend
|
|
onanimationend
|
|
|
|
/// onanimationiteration
|
|
onanimationiteration
|
|
];
|