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

fix tooltip width

parent 7dc8252b
...@@ -35,7 +35,7 @@ const baseStyle = defineStyle((props) => { ...@@ -35,7 +35,7 @@ const baseStyle = defineStyle((props) => {
[$bg.variable]: `colors.${ bg }`, [$bg.variable]: `colors.${ bg }`,
[$fg.variable]: `colors.${ fg }`, [$fg.variable]: `colors.${ fg }`,
[$arrowBg.variable]: $bg.reference, [$arrowBg.variable]: $bg.reference,
maxWidth: props.maxWidth || props.maxW || 'unset', maxWidth: props.maxWidth || props.maxW || 'calc(100vw - 8px)',
marginX: '4px', marginX: '4px',
}; };
}); });
......
...@@ -33,7 +33,7 @@ const MarketplaceAppIntegrationIcon = ({ external, internalWallet }: Props) => { ...@@ -33,7 +33,7 @@ const MarketplaceAppIntegrationIcon = ({ external, internalWallet }: Props) => {
textAlign="center" textAlign="center"
padding={ 2 } padding={ 2 }
openDelay={ 300 } openDelay={ 300 }
maxW={ 400 } maxW={{ base: 'calc(100vw - 8px)', lg: '400px' }}
> >
<IconSvg <IconSvg
name={ icon } name={ icon }
......
...@@ -95,7 +95,7 @@ const HashStringShortenDynamic = ({ hash, fontWeight = '400', isTooltipDisabled, ...@@ -95,7 +95,7 @@ const HashStringShortenDynamic = ({ hash, fontWeight = '400', isTooltipDisabled,
if (isTruncated) { if (isTruncated) {
return ( 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) => { ...@@ -28,7 +28,7 @@ const Hint = ({ label, className, tooltipProps, isLoading }: Props) => {
<Tooltip <Tooltip
label={ label } label={ label }
placement="top" placement="top"
maxW="320px" maxW={{ base: 'calc(100vw - 8px)', lg: '320px' }}
isOpen={ isOpen } isOpen={ isOpen }
{ ...tooltipProps } { ...tooltipProps }
> >
......
...@@ -79,7 +79,7 @@ const TruncatedTextTooltip = ({ children, label, placement }: Props) => { ...@@ -79,7 +79,7 @@ const TruncatedTextTooltip = ({ children, label, placement }: Props) => {
return ( return (
<Tooltip <Tooltip
label={ label } label={ label }
maxW={{ base: '100vw', lg: '400px' }} maxW={{ base: 'calc(100vw - 8px)', lg: '400px' }}
placement={ placement } placement={ placement }
isOpen={ isOpen } isOpen={ isOpen }
> >
......
...@@ -108,7 +108,7 @@ const Content = chakra((props: ContentProps) => { ...@@ -108,7 +108,7 @@ const Content = chakra((props: ContentProps) => {
); );
return ( 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"> <Skeleton isLoaded={ !props.isLoading } overflow="hidden" textOverflow="ellipsis" whiteSpace="nowrap" as="span">
{ nameText } { nameText }
</Skeleton> </Skeleton>
......
...@@ -76,7 +76,7 @@ const FileSnippet = ({ file, className, index, onRemove, isDisabled, error }: Pr ...@@ -76,7 +76,7 @@ const FileSnippet = ({ file, className, index, onRemove, isDisabled, error }: Pr
<Tooltip <Tooltip
label={ error } label={ error }
placement="top" placement="top"
maxW="320px" maxW={{ base: 'calc(100vw - 8px)', lg: '320px' }}
> >
<Box cursor="pointer" display="inherit" onClick={ handleErrorHintIconClick } ml={ 1 }> <Box cursor="pointer" display="inherit" onClick={ handleErrorHintIconClick } ml={ 1 }>
<IconSvg name="info" boxSize={ 5 } color="error"/> <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