Reorganize element-related traits
This commit is contained in:
parent
ca1d9dd0e5
commit
c23f17ee0b
42 changed files with 190 additions and 265 deletions
|
@ -1,4 +1,4 @@
|
|||
use gpui::{rems, svg, RenderOnce, Svg};
|
||||
use gpui::{rems, svg, IntoElement, Svg};
|
||||
use strum::EnumIter;
|
||||
|
||||
use crate::prelude::*;
|
||||
|
@ -133,14 +133,14 @@ impl Icon {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(RenderOnce)]
|
||||
#[derive(IntoElement)]
|
||||
pub struct IconElement {
|
||||
path: SharedString,
|
||||
color: Color,
|
||||
size: IconSize,
|
||||
}
|
||||
|
||||
impl Component for IconElement {
|
||||
impl RenderOnce for IconElement {
|
||||
type Rendered = Svg;
|
||||
|
||||
fn render(self, cx: &mut WindowContext) -> Self::Rendered {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue