-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Labels
Description
Description
When using the hook to conditionally render diferent logos based on screen width something weird happens on especific screen sizes
const ImageWrapper = ({ logoDesktop = desktopLogo, logoMobile = mobileLogo, alt, onClick }: IImageWrapper) => {
const responsiveSrc = useBreakpointValue({
base: logoMobile,
md: logoDesktop,
}, { ssr: false });
const responsiveWidth = useBreakpointValue({
base: '40px',
md: '112px',
}, { ssr: false });
return (
<Image
cursor='pointer'
src={responsiveSrc}
alt={alt}
width={responsiveWidth}
onClick={onClick}
marginRight={{ base: '0.5rem', md: '1rem' }} />
);
};Reproducing in the codesandbox sent below
Link to Reproduction
https://codesandbox.io/s/reverent-morning-fv2yjp?file=/src/index.js
Steps to reproduce
- Go to '...'
- Click on '...'
- Scroll down to '...'
- See error
Chakra UI Version
2.2.1
Browser
Google Chrome
Operating System
- macOS
- Windows
- Linux
Additional Information
No response
bertho-zero

