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.

26 lines (23 loc) 940 B
import * as React from "react"; import styled, { css } from "styled-components"; import { left } from "../../../utils/rtl"; import defaultTheme from "../../../defaultTheme"; const StyledButtonPrimitiveContentChildren = styled.div.withConfig({ displayName: "ButtonPrimitiveContentChildren__StyledButtonPrimitiveContentChildren", componentId: "sc-1m4y8u8-0" })(["", ""], ({ hasIcon, contentWidth }) => css(["display:inline-block;width:", ";text-align:", ";"], contentWidth, 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;