UNPKG

@wordpress/components

Version:
42 lines (36 loc) 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.alignmentHelpers = exports.ALIGNMENT_BREAKPOINTS = exports.WIDE_ALIGNMENTS = void 0; const WIDE_ALIGNMENTS = { alignments: { wide: 'wide', full: 'full' }, // `innerContainers`: Group of blocks based on `InnerBlocks` component, // used to nest other blocks inside innerContainers: ['core/group', 'core/columns', 'core/column', 'core/buttons', 'core/button'], excludeBlocks: ['core/heading'] }; exports.WIDE_ALIGNMENTS = WIDE_ALIGNMENTS; const ALIGNMENT_BREAKPOINTS = { wide: 1024, large: 820, medium: 768, small: 680, mobile: 480 }; exports.ALIGNMENT_BREAKPOINTS = ALIGNMENT_BREAKPOINTS; const isFullWidth = align => align === WIDE_ALIGNMENTS.alignments.full; const isWideWidth = align => align === WIDE_ALIGNMENTS.alignments.wide; const isWider = (width, breakpoint) => width > ALIGNMENT_BREAKPOINTS[breakpoint]; const isContainerRelated = blockName => WIDE_ALIGNMENTS.innerContainers.includes(blockName); const alignmentHelpers = { isFullWidth, isWideWidth, isWider, isContainerRelated }; exports.alignmentHelpers = alignmentHelpers; //# sourceMappingURL=alignments.native.js.map