aboutsummaryrefslogblamecommitdiffstats
path: root/packages/website/ts/style/media.ts
blob: 870d9a277a11dadf3dd387bf954703c0e00094e2 (plain) (tree)
1
2
3
4
5



                                                                                    
                                          








                                                  
import { css } from 'ts/style/theme';
import { ScreenWidths } from 'ts/types';

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),
};