Commit 3b2cc765 authored by Max Alekseenko's avatar Max Alekseenko

fix tooltip width

parent 7dc8252b
......@@ -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 }
......
......@@ -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>
);
}
......
......@@ -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 }
>
......
......@@ -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 }
>
......
......@@ -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>
......
......@@ -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"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment