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.

31 lines (28 loc) 1.09 kB
import * as React from "react"; import styled from "styled-components"; import ButtonLink from "../../ButtonLink"; import Close from "../../icons/Close"; import defaultTheme from "../../defaultTheme"; import { left } from "../../utils/rtl"; import useTranslate from "../../hooks/useTranslate"; var StyledDrawerClose = styled.div.withConfig({ displayName: "DrawerClose__StyledDrawerClose", componentId: "akfg41-0" })(["margin-", ":", ";"], left, function (_ref) { var theme = _ref.theme; return theme.orbit.spaceMedium; }); // $FlowFixMe: https://github.com/flow-typed/flow-typed/issues/3653#issuecomment-568539198 StyledDrawerClose.defaultProps = { theme: defaultTheme }; var DrawerClose = function DrawerClose(_ref2) { var onClick = _ref2.onClick; var translate = useTranslate(); return /*#__PURE__*/React.createElement(StyledDrawerClose, null, /*#__PURE__*/React.createElement(ButtonLink, { onClick: onClick, iconLeft: /*#__PURE__*/React.createElement(Close, null), type: "secondary", title: translate("drawer_hide") })); }; export default DrawerClose;