Fix tooltips not showing on IconButtons (#3427)

This PR fixes tooltips not showing on `IconButton`s.

The "fix" here is the same hack that we used to fix `on_click` handlers
for `ListItem`s, where we introduce another layer of wrapping with an
element with an ID set.

This PR also adds a story for the `IconButton` so this issue can be
tested/observed in isolation.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2023-11-28 17:01:53 -05:00 committed by GitHub
parent 8ee84249ec
commit ee027bc112
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 1 deletions

View file

@ -18,6 +18,7 @@ pub enum ComponentStory {
ContextMenu,
Focus,
Icon,
IconButton,
Input,
Keybinding,
Label,
@ -37,6 +38,7 @@ impl ComponentStory {
Self::ContextMenu => cx.build_view(|_| ui::ContextMenuStory).into(),
Self::Focus => FocusStory::view(cx).into(),
Self::Icon => cx.build_view(|_| ui::IconStory).into(),
Self::IconButton => cx.build_view(|_| ui::IconButtonStory).into(),
Self::Input => cx.build_view(|_| ui::InputStory).into(),
Self::Keybinding => cx.build_view(|_| ui::KeybindingStory).into(),
Self::Label => cx.build_view(|_| ui::LabelStory).into(),