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.

35 lines 889 B
import { QUERIES } from "../../utils/mediaQuery/consts"; export let GROW = /*#__PURE__*/function (GROW) { GROW["true"] = "grow"; GROW["false"] = "grow-0"; return GROW; }({}); export const growClasses = { [GROW.false]: "grow-0", [GROW.true]: "grow", [QUERIES.MEDIUMMOBILE]: { [GROW.false]: "mm:grow-0", [GROW.true]: "mm:grow" }, [QUERIES.LARGEMOBILE]: { [GROW.false]: "lm:grow-0", [GROW.true]: "lm:grow" }, [QUERIES.TABLET]: { [GROW.false]: "tb:grow-0", [GROW.true]: "tb:grow" }, [QUERIES.DESKTOP]: { [GROW.false]: "de:grow-0", [GROW.true]: "de:grow" }, [QUERIES.LARGEDESKTOP]: { [GROW.false]: "ld:grow-0", [GROW.true]: "ld:grow" } }; const getGrowClasses = (grow, viewport) => { const root = viewport ? growClasses[viewport] : growClasses; return grow ? root.grow : root["grow-0"]; }; export default getGrowClasses;