use gpui::{Svg, prelude::*, px};
use icons::Icon;
use theme::{TextStyle, ThemeExt};
pub trait Icons: ThemeExt {
fn icon(&self, icon: impl Into<Icon>) -> Svg {
self.icon_at(TextStyle::Body, icon)
}
fn icon_at(&self, role: TextStyle, icon: impl Into<Icon>) -> Svg {
icons::icon(icon)
.size(px(role.painted()))
.text_color(self.theme().text)
}
}
impl Icons for theme::Theme {}