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.

23 lines (22 loc) 779 B
"use strict"; exports.__esModule = true; exports.TOKEN = exports.QUERIES = void 0; exports.getBreakpointWidth = getBreakpointWidth; let QUERIES = exports.QUERIES = /*#__PURE__*/function (QUERIES) { QUERIES["MEDIUMMOBILE"] = "mediumMobile"; QUERIES["LARGEMOBILE"] = "largeMobile"; QUERIES["TABLET"] = "tablet"; QUERIES["DESKTOP"] = "desktop"; QUERIES["LARGEDESKTOP"] = "largeDesktop"; return QUERIES; }({}); const TOKEN = exports.TOKEN = { mediumMobile: "breakpointMediumMobile", largeMobile: "breakpointLargeMobile", tablet: "breakpointTablet", desktop: "breakpointDesktop", largeDesktop: "breakpointLargeDesktop" }; function getBreakpointWidth(name, theme, pure) { return pure ? theme.orbit[TOKEN[name]] : `(min-width: ${theme.orbit[TOKEN[name]]}px)`; }