use std::marker::PhantomData; use gpui2::Element; use crate::theme::{Theme, Themed}; pub trait ElementExt: Element { fn themed(self, theme: Theme) -> Themed where Self: Sized; } impl> ElementExt for E { fn themed(self, theme: Theme) -> Themed where Self: Sized, { Themed { child: self, theme, view_type: PhantomData, } } }