aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/style/media.ts
blob: 3c992eb9f708009a5cdadf237ab242da7bbd03ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { css } from 'ts/style/theme';
import { ScreenWidths } from 'ts/types';

const generateMediaWrapper = (screenWidth: ScreenWidths) => (...args: any[]) => css`
    @media (max-width: ${screenWidth}) {
        ${css.apply(css, args)};
    }
`;

export const media = {
    small: generateMediaWrapper(ScreenWidths.Sm),
    medium: generateMediaWrapper(ScreenWidths.Md),
    large: generateMediaWrapper(ScreenWidths.Lg),
};