motyl
Version:
Helper functions for creating responsive CSS-in-JS styles without runtime
9 lines (8 loc) • 547 B
TypeScript
import { BaseBreakpoints } from "./utils";
export declare function createBreakpoints<B extends string>(breakpoints: BaseBreakpoints<B>): {
up: (bp: B, orientation?: ("portrait" | "landscape") | undefined) => string;
down: (bp: B, orientation?: ("portrait" | "landscape") | undefined) => string;
only: (bp: B, orientation?: ("portrait" | "landscape") | undefined) => string;
between: (bp1: B, bp2: B, orientation?: ("portrait" | "landscape") | undefined) => string;
sortValuesByBp: <T>(values: [B, T][]) => [B, T][];
};