Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Expose a theme preview keybinding function (#23237)
Danilo Leal5c5a938ecf8f
diff --git a/crates/ui/src/traits/component_preview.rs b/crates/ui/src/traits/component_preview.rsindex aab01355a18..590e2fc3793 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<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))+}