@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 (32 loc) • 1.58 kB
JavaScript
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import * as React from "react";
import styled, { css } from "styled-components";
import defaultTheme from "../../../defaultTheme";
import onlyIE from "../../../utils/onlyIE";
var StyledButtonPrimitiveContent = styled(function (_ref) {
var theme = _ref.theme,
loading = _ref.loading,
hasCenteredContent = _ref.hasCenteredContent,
onlyIcon = _ref.onlyIcon,
contentAlign = _ref.contentAlign,
props = _objectWithoutProperties(_ref, ["theme", "loading", "hasCenteredContent", "onlyIcon", "contentAlign"]);
return /*#__PURE__*/React.createElement("div", props);
}).withConfig({
displayName: "ButtonPrimitiveContent__StyledButtonPrimitiveContent",
componentId: "g7vhys-0"
})(["visibility:", ";height:100%;display:flex;justify-content:", ";flex-basis:100%;align-items:center;", ";"], function (_ref2) {
var loading = _ref2.loading;
return loading && "hidden";
}, function (_ref3) {
var contentAlign = _ref3.contentAlign;
return contentAlign;
}, onlyIE(css(["min-width:100%;max-width:1px;"]))); // $FlowFixMe: https://github.com/flow-typed/flow-typed/issues/3653#issuecomment-568539198
StyledButtonPrimitiveContent.defaultProps = {
theme: defaultTheme
};
var ButtonPrimitiveContent = function ButtonPrimitiveContent(_ref4) {
var children = _ref4.children,
props = _objectWithoutProperties(_ref4, ["children"]);
return /*#__PURE__*/React.createElement(StyledButtonPrimitiveContent, props, children);
};
export default ButtonPrimitiveContent;