diff --git a/crates/ui2/src/components/icon_button.rs b/crates/ui2/src/components/icon_button.rs index ce3c2a9421c60b558f16b8694b2cd9a0a5be40a8..af028c13dce48b6a623a7fb3a34b4298e9914bc9 100644 --- a/crates/ui2/src/components/icon_button.rs +++ b/crates/ui2/src/components/icon_button.rs @@ -88,8 +88,8 @@ impl IconButton { }; let mut button = h_stack() - // TODO: We need to pass the ID in so that `IconButton`s can be differentiated from one another. - .id("icon_button") + // TODO: We probably need a more robust method for differentiating `IconButton`s from one another. + .id(SharedString::from(format!("{:?}", self.icon))) .justify_center() .rounded_md() .py(ui_size(cx, 0.25)) diff --git a/crates/ui2/src/elements/icon.rs b/crates/ui2/src/elements/icon.rs index 662aefe12fa2f51214c82f5f3266ab770fc0cb4a..ce63d9e9d761268f920adc46cdc7e54bedcc260b 100644 --- a/crates/ui2/src/elements/icon.rs +++ b/crates/ui2/src/elements/icon.rs @@ -44,7 +44,7 @@ impl IconColor { } } -#[derive(Default, PartialEq, Copy, Clone, EnumIter)] +#[derive(Debug, Default, PartialEq, Copy, Clone, EnumIter)] pub enum Icon { Ai, ArrowLeft,