@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 • 1.18 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-up2lqi-0"
})(["", ""], ({
theme,
transparent
}) => css(["&:hover,&:active,&:focus{background:", ";color:", ";transform:none;cursor:default;}", ";"], theme.orbit.backgroundButtonSecondary, theme.orbit.colorTextButtonSecondary, transparent && css(["&&&{background-color:transparent;box-shadow:none;}"])));
StyledButton.defaultProps = {
theme: defaultTheme
};
const ActiveButtonAsComponent = ({
transparent
}) => ({
children,
...props
}) => {
return /*#__PURE__*/React.createElement(StyledButton, _extends({}, props, {
transparent: transparent
}), children);
};
const ActiveButton = ({
children,
transparent,
size
}) => {
return /*#__PURE__*/React.createElement(Button, {
type: "secondary",
size: size,
asComponent: ActiveButtonAsComponent({
transparent
})
}, children);
};
export default ActiveButton;