@cimpress/react-components
Version:
React components to support the MCP styleguide
25 lines • 1.51 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;
};
import React from 'react';
import * as colors from '../colors';
export function ArrowAlt(props) {
const { className = '', color = '', direction = 'down', outline = colors.alloy, outlineWidth = '1px', size = 16 } = props, rest = __rest(props, ["className", "color", "direction", "outline", "outlineWidth", "size"]);
const transformDegrees = {
down: 0,
left: 90,
up: 180,
right: 270,
};
return (React.createElement("svg", Object.assign({ className: className, fill: color, stroke: outline, strokeWidth: outlineWidth, width: size, height: size, viewBox: "0 0 16 16" }, rest),
React.createElement("path", { d: "M7.4,12.8c0.3,0.3,0.8,0.3,1.1,0l1.9-2.1l0,0L15.7,5C15.9,4.8,16,4.5,16,4.2c0-0.3-0.1-0.6-0.3-0.8c-0.4-0.4-1.1-0.4-1.5,0\n L8.5,9.4c-0.3,0.3-0.8,0.3-1.1,0L1.8,3.3c-0.4-0.4-1.1-0.4-1.5,0C0.1,3.6,0,3.8,0,4.2C0,4.5,0.1,4.8,0.3,5l6.2,6.7l0,0L7.4,12.8z", transform: `rotate(${transformDegrees[direction]} 8 8)` })));
}
//# sourceMappingURL=ArrowAlt.js.map