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.

37 lines (33 loc) 1.02 kB
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; const _excluded = ["on", "block", "theme"]; import * as React from "react"; import styled from "styled-components"; import defaultTheme from "../defaultTheme"; import getViewportHideStyles from "./helpers/getViewportHideStyles"; import getDisplay from "./helpers/getDisplay"; const StyledHide = styled((_ref) => { let { on, block, theme } = _ref, props = _objectWithoutProperties(_ref, _excluded); return /*#__PURE__*/React.createElement("div", props); }).withConfig({ displayName: "Hide__StyledHide", componentId: "sc-k9qhrc-0" })(["", ";"], ({ on }) => getViewportHideStyles(on, getDisplay)); // $FlowFixMe: https://github.com/flow-typed/flow-typed/issues/3653#issuecomment-568539198 StyledHide.defaultProps = { theme: defaultTheme }; const Hide = ({ on = [], block, children }) => /*#__PURE__*/React.createElement(StyledHide, { on: on, block: block }, children); export default Hide;