chore: add document for actions
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use gpui::{actions, Action};
|
||||
use serde::Deserialize;
|
||||
|
||||
/// Define a custom confirm action
|
||||
#[derive(Clone, Action, PartialEq, Eq, Deserialize)]
|
||||
#[action(namespace = list, no_json)]
|
||||
pub struct Confirm {
|
||||
@@ -8,4 +9,14 @@ pub struct Confirm {
|
||||
pub secondary: bool,
|
||||
}
|
||||
|
||||
actions!(list, [Cancel, SelectPrev, SelectNext]);
|
||||
actions!(
|
||||
list,
|
||||
[
|
||||
/// Close current list
|
||||
Cancel,
|
||||
/// Select the next item in lists
|
||||
SelectPrev,
|
||||
/// Select the previous item in list
|
||||
SelectNext
|
||||
]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user