Skip to content

Commit cdc5fbc

Browse files
committed
fix: Tooltip wrapping
1 parent 64ba17f commit cdc5fbc

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

packages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/SamlMicrosoftConfigureSteps.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,17 +512,22 @@ const MicrosoftAttributeMappingTable = (): JSX.Element => (
512512
<Tooltip.Trigger>
513513
<Text
514514
as='span'
515+
tabIndex={0}
515516
sx={{
516517
fontFamily: 'monospace',
517518
display: 'block',
518519
overflow: 'hidden',
519520
textOverflow: 'ellipsis',
520521
whiteSpace: 'nowrap',
522+
outline: 'none',
521523
}}
522524
localizationKey={claimNameKey}
523525
/>
524526
</Tooltip.Trigger>
525-
<Tooltip.Content text={claimNameKey} />
527+
<Tooltip.Content
528+
text={claimNameKey}
529+
textSx={{ overflowWrap: 'anywhere' }}
530+
/>
526531
</Tooltip.Root>
527532
</Td>
528533
<Td>

packages/ui/src/elements/Tooltip.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,9 @@ const Content = React.forwardRef<
190190
React.HTMLProps<HTMLDivElement> & {
191191
text: string | LocalizationKey;
192192
sx?: ThemableCssProp;
193+
textSx?: ThemableCssProp;
193194
}
194-
>(function TooltipContent({ style, text, sx, ...props }, propRef) {
195+
>(function TooltipContent({ style, text, sx, textSx, ...props }, propRef) {
195196
const context = useTooltipContext();
196197
const ref = useMergeRefs([context.refs.setFloating, propRef]);
197198
const portalRoot = usePortalRoot();
@@ -232,6 +233,7 @@ const Content = React.forwardRef<
232233
localizationKey={text}
233234
variant='body'
234235
colorScheme='inherit'
236+
sx={textSx}
235237
/>
236238
</Box>
237239
</Box>

0 commit comments

Comments
 (0)