2022-12-21 13:50:41 +03:00

13 lines
412 B
TypeScript

import { screens } from './screens';
const threshold = 0;
export function min(breakpoint: keyof typeof screens) {
return `@media (min-width: calc(${screens[breakpoint]}px + ${threshold}px))`;
}
export function max(breakpoint: keyof typeof screens) {
return `@media (max-width: calc(${screens[breakpoint]}px))`;
}
export const breakpoints = Object.values(screens).map((value) => `${value + threshold}px`);