@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.
36 lines (33 loc) • 1.16 kB
JavaScript
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";
const StyledButton = styled.div.withConfig({
displayName: "ActiveButton__StyledButton",
componentId: "sc-9tleiy-0"
})(["&:hover,&:active,&:focus{background:", ";color:", ";transform:none;cursor:default;}", ";"], ({
theme
}) => theme.orbit.backgroundButtonSecondary, ({
theme
}) => theme.orbit.colorTextButtonSecondary, ({
transparent
}) => transparent && css(["&&&{background-color:transparent;box-shadow:none;}"])); // $FlowFixMe: https://github.com/flow-typed/flow-typed/issues/3653#issuecomment-568539198
StyledButton.defaultProps = {
theme: defaultTheme
};
const ActiveButton = ({
children,
transparent,
size
}) => {
return /*#__PURE__*/React.createElement(Button, {
type: "secondary",
size: size,
asComponent: props => /*#__PURE__*/React.createElement(StyledButton, _extends({}, props, {
type: undefined,
transparent: transparent
}))
}, children);
};
export default ActiveButton;