mirror of
https://github.com/aljazceru/lightning-address.git
synced 2025-12-17 13:24:22 +01:00
24 lines
460 B
JavaScript
24 lines
460 B
JavaScript
import { css } from 'styled-components';
|
|
|
|
// Media Queries
|
|
// Leverage the `media` function inside the theme
|
|
// to target specific screen sizes.
|
|
|
|
export const sizes = {
|
|
mobile: 320,
|
|
tablet: 768,
|
|
largeTablet: 920,
|
|
desktop: 1024,
|
|
largeDesktop: 1280,
|
|
};
|
|
|
|
export const media = Object.keys(sizes).reduce((acc, label) => {
|
|
acc[label] = (...args) => css`
|
|
@media (min-width: ${sizes[label]}px) {
|
|
${css(...args)}
|
|
}
|
|
`;
|
|
|
|
return acc;
|
|
}, {});
|