@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.
39 lines (34 loc) • 1.35 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";
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"
})(["", ""], ({
contentAlign,
loading
}) => css(["visibility:", ";height:100%;display:flex;justify-content:", ";flex-basis:100%;align-items:center;"], loading && "hidden", contentAlign)); // $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;