UNPKG

@retailmenot/anchor

Version:

A React UI Library by RetailMeNot

38 lines (37 loc) 1.43 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'; // VENDOR import classNames from 'classnames'; import styled from '@xstyled/styled-components'; import { space as spaceStyles } from '@xstyled/system'; const StyledItem = styled('a') ` display: inline-flex; justify-content: center; align-items: center; cursor: pointer; text-align: center; font-family: base; color: text.base; text-decoration: none; transition: color 250ms; // Disable Select user-select: none; -webkit-touch-callout: none; ${spaceStyles} `; export const Item = (_a) => { var { className, children, label, size, active } = _a, props = __rest(_a, ["className", "children", "label", "size", "active"]); return (React.createElement(StyledItem, Object.assign({ className: classNames('anchor-menu-item', className, { active }), active: active }, props), label ? label : children)); }; //# sourceMappingURL=Item.component.js.map