UNPKG

@retailmenot/anchor

Version:

A React UI Library by RetailMeNot

39 lines (37 loc) 1.44 kB
var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; // REACT import * as React from 'react'; // ANCHOR import { Button } from '../../Button'; import { Close } from '../../Icon'; // VENDOR import styled from '@xstyled/styled-components'; import classnames from 'classnames'; const StyledClose = styled('div') ` position: absolute; height: 3rem; width: 3rem; margin: 0.5rem; top: 0; ${({ align }) => align === 'left' ? 'left: 0;' : 'right: 0;'} display: flex; justify-content: center; align-items: center; cursor: pointer; `; export const ModalClose = (_a) => { var { className, align = 'right' } = _a, props = __rest(_a, ["className", "align"]); return (React.createElement(StyledClose, { className: classnames('anchor-modal-close', className), align: align }, React.createElement(Button, Object.assign({ prefix: React.createElement(Close, null), variant: "minimal", circular: true }, props)))); }; //# sourceMappingURL=Close.component.js.map