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.

40 lines (37 loc) 1.41 kB
import _extends from "@babel/runtime/helpers/esm/extends"; import * as React from "react"; import styled, { css } from "styled-components"; import Button from "../../Button"; import defaultTheme from "../../defaultTheme"; var StyledButton = styled.div.withConfig({ displayName: "ActiveButton__StyledButton", componentId: "sc-1j3a7nx-0" })(["&:hover,&:active,&:focus{background:", ";color:", ";transform:none;cursor:default;}", ";"], function (_ref) { var theme = _ref.theme; return theme.orbit.backgroundButtonSecondary; }, function (_ref2) { var theme = _ref2.theme; return theme.orbit.colorTextButtonSecondary; }, function (_ref3) { var transparent = _ref3.transparent; return transparent && css(["&&&{background-color:transparent;box-shadow:none;}"]); }); // $FlowFixMe: https://github.com/flow-typed/flow-typed/issues/3653#issuecomment-568539198 StyledButton.defaultProps = { theme: defaultTheme }; var ActiveButton = function ActiveButton(_ref4) { var children = _ref4.children, transparent = _ref4.transparent, size = _ref4.size; return /*#__PURE__*/React.createElement(Button, { type: "secondary", size: size, asComponent: function asComponent(props) { return /*#__PURE__*/React.createElement(StyledButton, _extends({}, props, { type: undefined, transparent: transparent })); } }, children); }; export default ActiveButton;