pub fn on_enter(el: &web_sys::HtmlElement) {
let style = el.style();
let height = el.offset_height();
let _ = style.set_property("max-height", "0");
let _ = el.offset_width();
let _ = style.set_property("transition", "");
let _ = style.set_property("max-height", &format!("{height}px"));
let _ = el.offset_width();
}
pub fn on_after_enter(el: &web_sys::HtmlElement) {
let _ = el.style().set_property("max-height", "");
}
pub fn on_before_leave(el: &web_sys::HtmlElement) {
let _ = el
.style()
.set_property("max-height", &format!("{}px", el.offset_height()));
let _ = el.offset_width();
}
pub fn on_leave(el: &web_sys::HtmlElement) {
let _ = el.style().set_property("max-height", "0");
let _ = el.offset_width();
}
pub fn on_after_leave(el: &web_sys::HtmlElement) {
let _ = el.style().set_property("max-height", "");
}