tag: Implement styled for custom style (#1319)
This commit is contained in:
parent
8c6cde3719
commit
df8bcefaaa
1 changed files with 8 additions and 0 deletions
|
|
@ -215,11 +215,19 @@ impl Sizable for Tag {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ParentElement for Tag {
|
impl ParentElement for Tag {
|
||||||
fn extend(&mut self, elements: impl IntoIterator<Item = AnyElement>) {
|
fn extend(&mut self, elements: impl IntoIterator<Item = AnyElement>) {
|
||||||
self.children.extend(elements);
|
self.children.extend(elements);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Styled for Tag {
|
||||||
|
fn style(&mut self) -> &mut StyleRefinement {
|
||||||
|
&mut self.style
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl RenderOnce for Tag {
|
impl RenderOnce for Tag {
|
||||||
fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement {
|
fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement {
|
||||||
let bg = if self.outline {
|
let bg = if self.outline {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue