diff --git a/crates/ui/src/traits/component_preview.rs b/crates/ui/src/traits/component_preview.rs index aab01355a1839b9b2e33c5086d53f2f03d740ed0..590e2fc37935d85395e77f7f987f4299e84f8d49 100644 --- a/crates/ui/src/traits/component_preview.rs +++ b/crates/ui/src/traits/component_preview.rs @@ -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( ) -> ComponentExampleGroup { ComponentExampleGroup::with_title(title, examples) } + +pub fn theme_preview_keybinding(keystrokes: &str) -> KeyBinding { + KeyBinding::new(gpui::KeyBinding::new(keystrokes, gpui::NoAction {}, None)) +}