@withjoy/joykit
Version:
UI Component Library for Joy web
18 lines (17 loc) • 669 B
TypeScript
import { BreakpointSize } from '../common';
export declare type Screen = 'mobile' | 'tablet' | 'desktop' | 'widescreen';
/**
* This function maps screen sizes to their respective sizes found at `breakpoints` under the nearest `theme`.
*
* Note: in order for this to tie into the theme config, this function must be used within the
* context of the `JoyKitThemeProvider`.
*/
export declare const breakpointsByScreen: (screen: Screen) => string | 0;
/**
* Screen breakpoints measured in rem.
*
* The sizing scale is defined under `theme.breakpoints`.
*/
export declare const breakpointsBySize: {
[screen in keyof BreakpointSize]: string;
};