feat: add tiles from gpui-components

This commit is contained in:
reya
2024-12-18 07:54:40 +07:00
parent 0682612d42
commit 407db7a7d5
13 changed files with 1018 additions and 182 deletions
+5 -6
View File
@@ -3,18 +3,17 @@ use gpui::{
Styled as _, WindowContext,
};
use crate::theme::ActiveTheme as _;
use super::{DockItemState, Panel, PanelEvent};
use super::{Panel, PanelEvent, PanelState};
use crate::theme::ActiveTheme;
pub(crate) struct InvalidPanel {
name: SharedString,
focus_handle: FocusHandle,
old_state: DockItemState,
old_state: PanelState,
}
impl InvalidPanel {
pub(crate) fn new(name: &str, state: DockItemState, cx: &mut WindowContext) -> Self {
pub(crate) fn new(name: &str, state: PanelState, cx: &mut WindowContext) -> Self {
Self {
focus_handle: cx.focus_handle(),
name: SharedString::from(name.to_owned()),
@@ -27,7 +26,7 @@ impl Panel for InvalidPanel {
"InvalidPanel"
}
fn dump(&self, _cx: &AppContext) -> super::DockItemState {
fn dump(&self, _cx: &AppContext) -> super::PanelState {
self.old_state.clone()
}
}