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
Makes for a verbose API when used in a component: ${props => props.theme.mediaWidth.upToMedium
Compare it with styled-media-query:
importstyledfrom"styled-components";// You need this as wellimportmediafrom"styled-media-query";constBox=styled.div` background: black;${media.lessThan("medium")` /* screen width is less than 768px (medium) */ background: red; `}`}
The default values for "medium", "small", etc., can be configured like this:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The styled-media-query package simplifies media query management in a Typescript-based React project that uses styled-components.
The current implementation:
any
types${props => props.theme.mediaWidth.upToMedium
Compare it with
styled-media-query
:The default values for "medium", "small", etc., can be configured like this:
Beta Was this translation helpful? Give feedback.
All reactions