Reorganize element-related traits

This commit is contained in:
Nathan Sobo
2023-11-22 11:19:43 -07:00
parent ca1d9dd0e5
commit c23f17ee0b
42 changed files with 190 additions and 265 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
use crate::{prelude::*, Label};
use gpui::{prelude::*, Div, RenderOnce, Stateful};
use gpui::{prelude::*, Div, IntoElement, Stateful};
#[derive(Default, PartialEq)]
pub enum InputVariant {
@@ -8,7 +8,7 @@ pub enum InputVariant {
Filled,
}
#[derive(RenderOnce)]
#[derive(IntoElement)]
pub struct Input {
placeholder: SharedString,
value: String,
@@ -18,7 +18,7 @@ pub struct Input {
is_active: bool,
}
impl Component for Input {
impl RenderOnce for Input {
type Rendered = Stateful<Div>;
fn render(self, cx: &mut WindowContext) -> Self::Rendered {