You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
constsizes={desktop: 992,tablet: 768,phone: 376}// Iterate through the sizes and create a media templateconstmedia=Object.keys(sizes).reduce((acc,label)=>{acc[label]=(...args)=>css` @media (max-width: ${sizes[label]/16}em) {${css(...args)} } `returnacc},{})constContent=styled.div` height: 3em; width: 3em; background: papayawhip; /* Now we have our methods on media and can use them instead of raw queries */${media.desktop`background: dodgerblue;`}${media.tablet`background: mediumseagreen;`}${media.phone`background: palevioletred;`}`;render(<Content/>);
see reference
The text was updated successfully, but these errors were encountered: