WIP: Work toward eliminating Component trait
This refactor enhances the overall design by promoting reusable and composable UI component structures within the Zed project codebase.
This commit is contained in:
parent
2515bbf990
commit
23ffce9fbe
46 changed files with 192 additions and 90 deletions
|
@ -80,7 +80,7 @@ impl<V: 'static> IconButton<V> {
|
|||
self.on_click(move |this, cx| cx.dispatch_action(action.boxed_clone()))
|
||||
}
|
||||
|
||||
fn render(mut self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {
|
||||
fn render(mut self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Element<V> {
|
||||
let icon_color = match (self.state, self.color) {
|
||||
(InteractionState::Disabled, _) => TextColor::Disabled,
|
||||
(InteractionState::Active, _) => TextColor::Selected,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue