Skip to content

Commit 80b0d84

Browse files
committed
make default button behavior
1 parent 8d4095c commit 80b0d84

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

web/lib/opal/src/components/buttons/Button/components.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ function Button({
160160
</Interactive.Base>
161161
);
162162

163-
if (!tooltip) return button;
163+
const resolvedTooltip =
164+
tooltip ??
165+
(interactiveBaseProps.disabled && children ? children : undefined);
166+
167+
if (!resolvedTooltip) return button;
164168

165169
return (
166170
<TooltipPrimitive.Root>
@@ -171,7 +175,7 @@ function Button({
171175
side={tooltipSide}
172176
sideOffset={4}
173177
>
174-
{tooltip}
178+
{resolvedTooltip}
175179
</TooltipPrimitive.Content>
176180
</TooltipPrimitive.Portal>
177181
</TooltipPrimitive.Root>

web/src/sections/input/AppInputBar.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,6 @@ const AppInputBar = React.memo(
746746
selected={deepResearchEnabled}
747747
foldable={!deepResearchEnabled}
748748
disabled={disabled}
749-
tooltip="Deep Research"
750749
>
751750
Deep Research
752751
</Button>

0 commit comments

Comments
 (0)