UNPKG

react-native-flex-grid

Version:

🎨 A react-native flexbox grid similar to bootstap's web grid.

68 lines (62 loc) • 1.34 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setConfig = exports.getConfig = exports.SPACER = void 0; /** Grid breakpoints available */ /** Grid configuration type */ /** Grid configuration input type for overrides */ /** Base spacer -- equivalent to HTML font-size and rem */ const SPACER = 16; /** Grid configuration */ exports.SPACER = SPACER; let GRID_CONFIG = { /** Grid Breakpoints */ breakpoints: { xs: 0, sm: 375, md: 768, lg: 1024, xl: 1200 }, /** Grid column count */ colCount: 12, /** Common gutters used */ gutters: { 0: 0, 1: SPACER * 0.25, 2: SPACER * 0.5, 3: SPACER, 4: SPACER * 1.5, 5: SPACER * 3 }, /** Container max widths */ containerMaxWidths: { xs: '100%', sm: '100%', md: '100%', lg: '100%', xl: 1140 }, /** Container paddings horizontal */ containerPaddingsHorizontal: { xs: 16, sm: 20, md: 40, lg: 48, xl: 48 } }; /** Get Grid configuration */ const getConfig = () => GRID_CONFIG; /** Set Grid configuration - extends existing configuration */ exports.getConfig = getConfig; const setConfig = newConfig => { GRID_CONFIG = { ...GRID_CONFIG, ...newConfig }; return GRID_CONFIG; }; exports.setConfig = setConfig; //# sourceMappingURL=grid.js.map