blob: fa7571077f0588f53d43da58317437b4c6c87a0e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import { css } from './theme';
export enum ScreenWidths {
Sm = 40,
Md = 52,
Lg = 64,
}
const generateMediaWrapper = (screenWidth: ScreenWidths) => (...args: any[]) => css`
@media (max-width: ${screenWidth}em) {
${css.apply(css, args)};
}
`;
export const media = {
small: generateMediaWrapper(ScreenWidths.Sm),
medium: generateMediaWrapper(ScreenWidths.Md),
large: generateMediaWrapper(ScreenWidths.Lg),
};
|