chore: add document for actions

This commit is contained in:
2025-07-05 08:33:40 +07:00
parent 9bb784652d
commit 122dbaf693
8 changed files with 84 additions and 6 deletions

View File

@@ -14,7 +14,13 @@ use crate::{Selectable, StyledExt as _};
const CONTEXT: &str = "Popover";
actions!(popover, [Escape]);
actions!(
popover,
[
/// Action when user presses escape button
Escape
]
);
pub fn init(cx: &mut App) {
cx.bind_keys([KeyBinding::new("escape", Escape, Some(CONTEXT))])