@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.
27 lines (24 loc) • 924 B
JavaScript
import * as React from "react";
import styled from "styled-components";
import { left } from "../../../utils/rtl";
import defaultTheme from "../../../defaultTheme";
const StyledButtonPrimitiveContentChildren = styled.div.withConfig({
displayName: "ButtonPrimitiveContentChildren__StyledButtonPrimitiveContentChildren",
componentId: "sc-1m4y8u8-0"
})(["display:inline-block;width:", ";text-align:", ";"], ({
contentWidth
}) => contentWidth, ({
hasIcon
}) => hasIcon && left); // $FlowFixMe: https://github.com/flow-typed/flow-typed/issues/3653#issuecomment-568539198
StyledButtonPrimitiveContentChildren.defaultProps = {
theme: defaultTheme
};
const ButtonPrimitiveContentChildren = ({
children,
hasIcon,
contentWidth
}) => /*#__PURE__*/React.createElement(StyledButtonPrimitiveContentChildren, {
hasIcon: hasIcon,
contentWidth: contentWidth
}, children);
export default ButtonPrimitiveContentChildren;