@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.
41 lines (36 loc) • 1.45 kB
JavaScript
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
const _excluded = ["theme", "loading", "hasCenteredContent", "onlyIcon", "contentAlign"],
_excluded2 = ["children"];
import * as React from "react";
import styled, { css } from "styled-components";
import defaultTheme from "../../../defaultTheme";
import onlyIE from "../../../utils/onlyIE";
const StyledButtonPrimitiveContent = styled((_ref) => {
let {
theme,
loading,
hasCenteredContent,
onlyIcon,
contentAlign
} = _ref,
props = _objectWithoutProperties(_ref, _excluded);
return /*#__PURE__*/React.createElement("div", props);
}).withConfig({
displayName: "ButtonPrimitiveContent__StyledButtonPrimitiveContent",
componentId: "sc-1r81o9a-0"
})(["visibility:", ";height:100%;display:flex;justify-content:", ";flex-basis:100%;align-items:center;", ";"], ({
loading
}) => loading && "hidden", ({
contentAlign
}) => 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
};
const ButtonPrimitiveContent = (_ref2) => {
let {
children
} = _ref2,
props = _objectWithoutProperties(_ref2, _excluded2);
return /*#__PURE__*/React.createElement(StyledButtonPrimitiveContent, props, children);
};
export default ButtonPrimitiveContent;