UNPKG

@kiwicom/orbit-components

Version:

Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.

63 lines (62 loc) 2.42 kB
"use strict"; exports.__esModule = true; exports.default = exports.alignContentClasses = exports.ALIGN_CONTENT = void 0; var _consts = require("../../utils/mediaQuery/consts"); let ALIGN_CONTENT = /*#__PURE__*/function (ALIGN_CONTENT) { ALIGN_CONTENT["START"] = "start"; ALIGN_CONTENT["CENTER"] = "center"; ALIGN_CONTENT["END"] = "end"; ALIGN_CONTENT["BASELINE"] = "baseline"; ALIGN_CONTENT["STRETCH"] = "stretch"; return ALIGN_CONTENT; }({}); exports.ALIGN_CONTENT = ALIGN_CONTENT; const alignContentClasses = { [ALIGN_CONTENT.START]: "content-start", [ALIGN_CONTENT.END]: "content-end", [ALIGN_CONTENT.CENTER]: "content-center", [ALIGN_CONTENT.BASELINE]: "content-baseline", [ALIGN_CONTENT.STRETCH]: "content-stretch", [_consts.QUERIES.MEDIUMMOBILE]: { [ALIGN_CONTENT.START]: "mm:content-start", [ALIGN_CONTENT.END]: "mm:content-end", [ALIGN_CONTENT.CENTER]: "mm:content-center", [ALIGN_CONTENT.BASELINE]: "mm:content-baseline", [ALIGN_CONTENT.STRETCH]: "mm:content-stretch" }, [_consts.QUERIES.LARGEMOBILE]: { [ALIGN_CONTENT.START]: "lm:content-start", [ALIGN_CONTENT.END]: "lm:content-end", [ALIGN_CONTENT.CENTER]: "lm:content-center", [ALIGN_CONTENT.BASELINE]: "lm:content-baseline", [ALIGN_CONTENT.STRETCH]: "lm:content-stretch" }, [_consts.QUERIES.TABLET]: { [ALIGN_CONTENT.START]: "tb:content-start", [ALIGN_CONTENT.END]: "tb:content-end", [ALIGN_CONTENT.CENTER]: "tb:content-center", [ALIGN_CONTENT.BASELINE]: "tb:content-baseline", [ALIGN_CONTENT.STRETCH]: "tb:content-stretch" }, [_consts.QUERIES.DESKTOP]: { [ALIGN_CONTENT.START]: "de:content-start", [ALIGN_CONTENT.END]: "de:content-end", [ALIGN_CONTENT.CENTER]: "de:content-center", [ALIGN_CONTENT.BASELINE]: "de:content-baseline", [ALIGN_CONTENT.STRETCH]: "de:content-stretch" }, [_consts.QUERIES.LARGEDESKTOP]: { [ALIGN_CONTENT.START]: "ld:content-start", [ALIGN_CONTENT.END]: "ld:content-end", [ALIGN_CONTENT.CENTER]: "ld:content-center", [ALIGN_CONTENT.BASELINE]: "ld:content-baseline", [ALIGN_CONTENT.STRETCH]: "ld:content-stretch" } }; exports.alignContentClasses = alignContentClasses; const getAlignContentClasses = (align, viewport) => { const root = viewport ? alignContentClasses[viewport] : alignContentClasses; return root[align]; }; var _default = getAlignContentClasses; exports.default = _default;