Rename back to div
This commit is contained in:
parent
be18c47912
commit
c6e8a097a3
62 changed files with 154 additions and 156 deletions
|
@ -77,11 +77,11 @@ pub use stories::*;
|
|||
mod stories {
|
||||
use super::*;
|
||||
use crate::Story;
|
||||
use gpui::{Node, Render};
|
||||
use gpui::{Div, Render};
|
||||
pub struct AssistantPanelStory;
|
||||
|
||||
impl Render for AssistantPanelStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::{h_stack, prelude::*, HighlightedText};
|
||||
use gpui::{prelude::*, Node};
|
||||
use gpui::{prelude::*, Div};
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[derive(Clone)]
|
||||
|
@ -16,7 +16,7 @@ impl Breadcrumb {
|
|||
Self { path, symbols }
|
||||
}
|
||||
|
||||
fn render_separator<V: 'static>(&self, cx: &WindowContext) -> Node<V> {
|
||||
fn render_separator<V: 'static>(&self, cx: &WindowContext) -> Div<V> {
|
||||
div()
|
||||
.child(" › ")
|
||||
.text_color(cx.theme().colors().text_muted)
|
||||
|
@ -77,7 +77,7 @@ mod stories {
|
|||
pub struct BreadcrumbStory;
|
||||
|
||||
impl Render for BreadcrumbStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -235,12 +235,12 @@ mod stories {
|
|||
empty_buffer_example, hello_world_rust_buffer_example,
|
||||
hello_world_rust_buffer_with_status_example, Story,
|
||||
};
|
||||
use gpui::{rems, Node, Render};
|
||||
use gpui::{rems, Div, Render};
|
||||
|
||||
pub struct BufferStory;
|
||||
|
||||
impl Render for BufferStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use gpui::{Node, Render, View, VisualContext};
|
||||
use gpui::{Div, Render, View, VisualContext};
|
||||
|
||||
use crate::prelude::*;
|
||||
use crate::{h_stack, Icon, IconButton, IconColor, Input};
|
||||
|
@ -27,9 +27,9 @@ impl BufferSearch {
|
|||
}
|
||||
|
||||
impl Render for BufferSearch {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Node<Self> {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Div<Self> {
|
||||
h_stack()
|
||||
.bg(cx.theme().colors().toolbar_background)
|
||||
.p_2()
|
||||
|
|
|
@ -107,7 +107,7 @@ pub use stories::*;
|
|||
#[cfg(feature = "stories")]
|
||||
mod stories {
|
||||
use chrono::DateTime;
|
||||
use gpui::{Node, Render};
|
||||
use gpui::{Div, Render};
|
||||
|
||||
use crate::{Panel, Story};
|
||||
|
||||
|
@ -116,7 +116,7 @@ mod stories {
|
|||
pub struct ChatPanelStory;
|
||||
|
||||
impl Render for ChatPanelStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -93,12 +93,12 @@ pub use stories::*;
|
|||
mod stories {
|
||||
use super::*;
|
||||
use crate::Story;
|
||||
use gpui::{Node, Render};
|
||||
use gpui::{Div, Render};
|
||||
|
||||
pub struct CollabPanelStory;
|
||||
|
||||
impl Render for CollabPanelStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -27,7 +27,7 @@ pub use stories::*;
|
|||
|
||||
#[cfg(feature = "stories")]
|
||||
mod stories {
|
||||
use gpui::{Node, Render};
|
||||
use gpui::{Div, Render};
|
||||
|
||||
use crate::Story;
|
||||
|
||||
|
@ -36,7 +36,7 @@ mod stories {
|
|||
pub struct CommandPaletteStory;
|
||||
|
||||
impl Render for CommandPaletteStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -25,7 +25,7 @@ pub use stories::*;
|
|||
|
||||
#[cfg(feature = "stories")]
|
||||
mod stories {
|
||||
use gpui::{Node, Render};
|
||||
use gpui::{Div, Render};
|
||||
|
||||
use crate::Story;
|
||||
|
||||
|
@ -34,7 +34,7 @@ mod stories {
|
|||
pub struct CopilotModalStory;
|
||||
|
||||
impl Render for CopilotModalStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::path::PathBuf;
|
||||
|
||||
use gpui::{Node, Render, View, VisualContext};
|
||||
use gpui::{Div, Render, View, VisualContext};
|
||||
|
||||
use crate::prelude::*;
|
||||
use crate::{
|
||||
|
@ -48,9 +48,9 @@ impl EditorPane {
|
|||
}
|
||||
|
||||
impl Render for EditorPane {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Node<Self> {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Div<Self> {
|
||||
v_stack()
|
||||
.w_full()
|
||||
.h_full()
|
||||
|
|
|
@ -40,12 +40,12 @@ pub use stories::*;
|
|||
mod stories {
|
||||
use super::*;
|
||||
use crate::Story;
|
||||
use gpui::{Node, Render};
|
||||
use gpui::{Div, Render};
|
||||
|
||||
pub struct LanguageSelectorStory;
|
||||
|
||||
impl Render for LanguageSelectorStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -40,12 +40,12 @@ pub use stories::*;
|
|||
mod stories {
|
||||
use super::*;
|
||||
use crate::{hello_world_rust_buffer_example, Story};
|
||||
use gpui::{Node, Render};
|
||||
use gpui::{Div, Render};
|
||||
|
||||
pub struct MultiBufferStory;
|
||||
|
||||
impl Render for MultiBufferStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -352,12 +352,12 @@ pub use stories::*;
|
|||
mod stories {
|
||||
use super::*;
|
||||
use crate::{Panel, Story};
|
||||
use gpui::{Node, Render};
|
||||
use gpui::{Div, Render};
|
||||
|
||||
pub struct NotificationsPanelStory;
|
||||
|
||||
impl Render for NotificationsPanelStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -55,12 +55,12 @@ pub use stories::*;
|
|||
mod stories {
|
||||
use super::*;
|
||||
use crate::{Panel, Story};
|
||||
use gpui::{Node, Render};
|
||||
use gpui::{Div, Render};
|
||||
|
||||
pub struct ProjectPanelStory;
|
||||
|
||||
impl Render for ProjectPanelStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -36,12 +36,12 @@ pub use stories::*;
|
|||
mod stories {
|
||||
use super::*;
|
||||
use crate::Story;
|
||||
use gpui::{Node, Render};
|
||||
use gpui::{Div, Render};
|
||||
|
||||
pub struct RecentProjectsStory;
|
||||
|
||||
impl Render for RecentProjectsStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -100,12 +100,12 @@ pub use stories::*;
|
|||
mod stories {
|
||||
use super::*;
|
||||
use crate::Story;
|
||||
use gpui::{Node, Render};
|
||||
use gpui::{Div, Render};
|
||||
|
||||
pub struct TabBarStory;
|
||||
|
||||
impl Render for TabBarStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -83,11 +83,11 @@ pub use stories::*;
|
|||
mod stories {
|
||||
use super::*;
|
||||
use crate::Story;
|
||||
use gpui::{Node, Render};
|
||||
use gpui::{Div, Render};
|
||||
pub struct TerminalStory;
|
||||
|
||||
impl Render for TerminalStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -39,7 +39,7 @@ pub use stories::*;
|
|||
|
||||
#[cfg(feature = "stories")]
|
||||
mod stories {
|
||||
use gpui::{Node, Render};
|
||||
use gpui::{Div, Render};
|
||||
|
||||
use crate::Story;
|
||||
|
||||
|
@ -48,7 +48,7 @@ mod stories {
|
|||
pub struct ThemeSelectorStory;
|
||||
|
||||
impl Render for ThemeSelectorStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::Arc;
|
||||
|
||||
use gpui::{Node, Render, View, VisualContext};
|
||||
use gpui::{Div, Render, View, VisualContext};
|
||||
|
||||
use crate::prelude::*;
|
||||
use crate::settings::user_settings;
|
||||
|
@ -86,9 +86,9 @@ impl TitleBar {
|
|||
}
|
||||
|
||||
impl Render for TitleBar {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Node<Self> {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Div<Self> {
|
||||
let settings = user_settings(cx);
|
||||
|
||||
// let has_focus = cx.window_is_active();
|
||||
|
@ -202,9 +202,9 @@ mod stories {
|
|||
}
|
||||
|
||||
impl Render for TitleBarStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Node<Self> {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Div<Self> {
|
||||
Story::container(cx)
|
||||
.child(Story::title_for::<_, TitleBar>(cx))
|
||||
.child(Story::label(cx, "Default"))
|
||||
|
|
|
@ -73,7 +73,7 @@ mod stories {
|
|||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
|
||||
use gpui::{Node, Render};
|
||||
use gpui::{Div, Render};
|
||||
|
||||
use crate::{Breadcrumb, HighlightedText, Icon, IconButton, Story, Symbol};
|
||||
|
||||
|
@ -82,7 +82,7 @@ mod stories {
|
|||
pub struct ToolbarStory;
|
||||
|
||||
impl Render for ToolbarStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -77,7 +77,7 @@ pub use stories::*;
|
|||
|
||||
#[cfg(feature = "stories")]
|
||||
mod stories {
|
||||
use gpui::{Node, Render};
|
||||
use gpui::{Div, Render};
|
||||
|
||||
use crate::Story;
|
||||
|
||||
|
@ -86,7 +86,7 @@ mod stories {
|
|||
pub struct TrafficLightsStory;
|
||||
|
||||
impl Render for TrafficLightsStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
Story::container(cx)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use chrono::DateTime;
|
||||
use gpui::{px, relative, Node, Render, Size, View, VisualContext};
|
||||
use gpui::{px, relative, Div, Render, Size, View, VisualContext};
|
||||
use settings2::Settings;
|
||||
use theme2::ThemeSettings;
|
||||
|
||||
|
@ -192,9 +192,9 @@ impl Workspace {
|
|||
}
|
||||
|
||||
impl Render for Workspace {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Node<Self> {
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Div<Self> {
|
||||
let root_group = PaneGroup::new_panes(
|
||||
vec![Pane::new(
|
||||
"pane-0",
|
||||
|
@ -388,7 +388,7 @@ mod stories {
|
|||
}
|
||||
|
||||
impl Render for WorkspaceStory {
|
||||
type Element = Node<Self>;
|
||||
type Element = Div<Self>;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
div().child(self.workspace.clone())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue