Expose a theme preview keybinding function (#23237)
This is useful if we want to pass random strings as keybindings for any component that takes one, so we can display them on the debug theme preview pane. Release Notes: - N/A Co-authored-by: Agus Zubiaga <hi@aguz.me>
This commit is contained in:
co-authored by
Agus Zubiaga
parent
92f05d1ab1
commit
5c5a938ecf
@@ -1,5 +1,5 @@
|
||||
#![allow(missing_docs)]
|
||||
use crate::prelude::*;
|
||||
use crate::{prelude::*, KeyBinding};
|
||||
use gpui::{AnyElement, SharedString};
|
||||
|
||||
/// Which side of the preview to show labels on
|
||||
@@ -198,3 +198,7 @@ pub fn example_group_with_title<T>(
|
||||
) -> ComponentExampleGroup<T> {
|
||||
ComponentExampleGroup::with_title(title, examples)
|
||||
}
|
||||
|
||||
pub fn theme_preview_keybinding(keystrokes: &str) -> KeyBinding {
|
||||
KeyBinding::new(gpui::KeyBinding::new(keystrokes, gpui::NoAction {}, None))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user