Skip to content

Commit 9673ef7

Browse files
authored
fix(action-bar, action-pad): Add native tooltip to expand action (#7452)
**Related Issue:** #7451 ## Summary - Add native tooltip to expand action when no tooltip is slotted.
1 parent 8ee67f3 commit 9673ef7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/calcite-components/src/components/functional/ExpandToggle.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export const ExpandToggle: FunctionalComponent<ExpandToggleProps> = ({
9393
scale={scale}
9494
text={text}
9595
textEnabled={expanded}
96+
title={!expanded && !tooltip ? text : null}
9697
// eslint-disable-next-line react/jsx-sort-props
9798
ref={(referenceElement): HTMLCalciteActionElement =>
9899
setTooltipReference({ tooltip, referenceElement, expanded, ref })

0 commit comments

Comments
 (0)