@retailmenot/anchor
Version:
A React UI Library by RetailMeNot
27 lines • 1.88 kB
JavaScript
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';
import classNames from 'classnames';
import { Scale, StyledIcon, DefaultColor, DefaultScale, } from '../utils';
/* eslint-disable max-len */
export const Heart = React.forwardRef((_a, ref) => {
var { color = DefaultColor, scale = DefaultScale, className } = _a, props = __rest(_a, ["color", "scale", "className"]);
return (React.createElement(StyledIcon, Object.assign({ ref: ref, className: classNames('anchor-icon heart', className), scale: scale, "$color": color }, props),
React.createElement("svg", { width: Scale[scale], height: Scale[scale], viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink" },
React.createElement("defs", null,
React.createElement("path", { d: "M14.68 2.343A4.55 4.55 0 0 0 11.439 1c-1.23 0-2.393.489-3.317 1.422l-.123.15-.19-.229A4.55 4.55 0 0 0 4.564 1 4.55 4.55 0 0 0 1.32 2.343c-1.758 1.762-1.76 4.628-.014 6.381l5.275 5.475c.306.319.767.801 1.415.801.652 0 1.134-.5 1.422-.799l5.262-5.463a4.535 4.535 0 0 0 0-6.395", id: "heart-a" })),
React.createElement("g", { fill: "none", fillRule: "evenodd" },
React.createElement("path", { d: "M0 0h16v16H0z" }),
React.createElement("use", { fill: "currentColor", xlinkHref: "#heart-a" })))));
});
//# sourceMappingURL=Heart.component.js.map