UNPKG

@wordpress/components

Version:
33 lines 1.13 kB
/** * Internal dependencies */ import type { AlignmentMatrixControlValue } from './types'; export declare const GRID: AlignmentMatrixControlValue[][]; export declare const ALIGNMENT_LABEL: Record<AlignmentMatrixControlValue, string>; export declare const ALIGNMENTS: AlignmentMatrixControlValue[]; /** * Parses and transforms an incoming value to better match the alignment values * * @param value An alignment value to parse. * * @return The parsed value. */ export declare function transformValue(value: AlignmentMatrixControlValue): AlignmentMatrixControlValue; /** * Creates an item ID based on a prefix ID and an alignment value. * * @param prefixId An ID to prefix. * @param value An alignment value. * * @return The item id. */ export declare function getItemId(prefixId: string, value: AlignmentMatrixControlValue): string; /** * Retrieves the alignment index from a value. * * @param alignment Value to check. * * @return The index of a matching alignment. */ export declare function getAlignmentIndex(alignment?: AlignmentMatrixControlValue): number | undefined; //# sourceMappingURL=utils.d.ts.map