@wordpress/components
Version:
UI components for WordPress.
55 lines (54 loc) • 1.11 kB
JavaScript
;
Object.defineProperties(exports, {
__esModule: { value: true },
[Symbol.toStringTag]: { value: "Module" }
});
// packages/components/src/grid/utils.ts
const ALIGNMENTS = {
bottom: {
alignItems: "flex-end",
justifyContent: "center"
},
bottomLeft: {
alignItems: "flex-end",
justifyContent: "flex-start"
},
bottomRight: {
alignItems: "flex-end",
justifyContent: "flex-end"
},
center: {
alignItems: "center",
justifyContent: "center"
},
spaced: {
alignItems: "center",
justifyContent: "space-between"
},
left: {
alignItems: "center",
justifyContent: "flex-start"
},
right: {
alignItems: "center",
justifyContent: "flex-end"
},
stretch: { alignItems: "stretch" },
top: {
alignItems: "flex-start",
justifyContent: "center"
},
topLeft: {
alignItems: "flex-start",
justifyContent: "flex-start"
},
topRight: {
alignItems: "flex-start",
justifyContent: "flex-end"
}
};
function getAlignmentProps(alignment) {
return alignment ? ALIGNMENTS[alignment] ?? {} : {};
}
exports.getAlignmentProps = getAlignmentProps;
//# sourceMappingURL=utils.cjs.map