fix tooltip width

This commit is contained in:
Max Alekseenko
2024-07-17 18:56:04 +02:00
parent 30f4ba7876
commit 2e5b6aaafe
9 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ const baseStyle = defineStyle((props) => {
[$bg.variable]: `colors.${ bg }`,
[$fg.variable]: `colors.${ fg }`,
[$arrowBg.variable]: $bg.reference,
maxWidth: props.maxWidth || props.maxW || 'unset',
maxWidth: props.maxWidth || props.maxW || 'calc(100vw - 8px)',
marginX: '4px',
};
});
@@ -33,7 +33,7 @@ const MarketplaceAppIntegrationIcon = ({ external, internalWallet }: Props) => {
textAlign="center"
padding={ 2 }
openDelay={ 300 }
maxW={ 400 }
maxW={{ base: 'calc(100vw - 8px)', lg: '400px' }}
>
<IconSvg
name={ icon }
+1 -1
View File
@@ -95,7 +95,7 @@ const HashStringShortenDynamic = ({ hash, fontWeight = '400', isTooltipDisabled,
if (isTruncated) {
return (
<Tooltip label={ hash } isDisabled={ isTooltipDisabled } maxW={{ base: '100vw', lg: '400px' }}>{ content }</Tooltip>
<Tooltip label={ hash } isDisabled={ isTooltipDisabled } maxW={{ base: 'calc(100vw - 8px)', lg: '400px' }}>{ content }</Tooltip>
);
}
+1 -1
View File
@@ -28,7 +28,7 @@ const Hint = ({ label, className, tooltipProps, isLoading }: Props) => {
<Tooltip
label={ label }
placement="top"
maxW="320px"
maxW={{ base: 'calc(100vw - 8px)', lg: '320px' }}
isOpen={ isOpen }
{ ...tooltipProps }
>
+1 -1
View File
@@ -79,7 +79,7 @@ const TruncatedTextTooltip = ({ children, label, placement }: Props) => {
return (
<Tooltip
label={ label }
maxW={{ base: '100vw', lg: '400px' }}
maxW={{ base: 'calc(100vw - 8px)', lg: '400px' }}
placement={ placement }
isOpen={ isOpen }
>
+1 -1
View File
@@ -108,7 +108,7 @@ const Content = chakra((props: ContentProps) => {
);
return (
<Tooltip label={ label } maxW={{ base: '100vw', lg: '400px' }}>
<Tooltip label={ label } maxW={{ base: 'calc(100vw - 8px)', lg: '400px' }}>
<Skeleton isLoaded={ !props.isLoading } overflow="hidden" textOverflow="ellipsis" whiteSpace="nowrap" as="span">
{ nameText }
</Skeleton>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

+1 -1
View File
@@ -76,7 +76,7 @@ const FileSnippet = ({ file, className, index, onRemove, isDisabled, error }: Pr
<Tooltip
label={ error }
placement="top"
maxW="320px"
maxW={{ base: 'calc(100vw - 8px)', lg: '320px' }}
>
<Box cursor="pointer" display="inherit" onClick={ handleErrorHintIconClick } ml={ 1 }>
<IconSvg name="info" boxSize={ 5 } color="error"/>