Skip to content

Commit

Permalink
Wrap buttons with tooltips in span elements so that the tooltips can …
Browse files Browse the repository at this point in the history
…still be expanded even when the buttons are disabled.
  • Loading branch information
junhaoliao committed Dec 26, 2024
1 parent a93024c commit c2af7c6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
8 changes: 5 additions & 3 deletions src/components/MenuBar/MenuBarIconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ const MenuBarIconButton = ({
placement={tooltipPlacement ?? "bottom-end"}
title={title}
>
<IconButton
size={"sm"}
{...rest}/>
<span>
<IconButton
size={"sm"}
{...rest}/>
</span>
</Tooltip>
);

Expand Down
26 changes: 14 additions & 12 deletions src/components/StatusBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,20 @@ const StatusBar = () => {
</Typography>

<Tooltip title={"Copy link to clipboard"}>
<Button
color={"primary"}
disabled={isDisabled(uiState, UI_ELEMENT.LOG_EVENT_NUM_DISPLAY)}
size={"sm"}
variant={"soft"}
onClick={handleCopyLinkButtonClick}
>
{"Log Event "}
{logEventNum}
{" / "}
{numEvents}
</Button>
<span>
<Button
color={"primary"}
disabled={isDisabled(uiState, UI_ELEMENT.LOG_EVENT_NUM_DISPLAY)}
size={"sm"}
variant={"soft"}
onClick={handleCopyLinkButtonClick}
>
{"Log Event "}
{logEventNum}
{" / "}
{numEvents}
</Button>
</span>
</Tooltip>

<LogLevelSelect/>
Expand Down

0 comments on commit c2af7c6

Please sign in to comment.