mirror of
https://github.com/aljazceru/lightning-address.git
synced 2025-12-17 05:14:22 +01:00
chore: readme and docs
feature: responsiveness
This commit is contained in:
23
utils.js
Normal file
23
utils.js
Normal file
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
}, {});
|
||||
Reference in New Issue
Block a user