@cimpress/react-components
Version:
React components to support the MCP styleguide
34 lines • 1.86 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;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.HalfCircle = void 0;
const react_1 = __importDefault(require("react"));
const colors_1 = require("../../colors");
const HalfCircle = (_a) => {
var { className = 'default', color = '', backgroundColor = 'white', width = 14, outline = colors_1.alloy, direction = 'left' } = _a, rest = __rest(_a, ["className", "color", "backgroundColor", "width", "outline", "direction"]);
const directions = {
top: 90,
left: 0,
bottom: 270,
right: 180,
};
return (react_1.default.createElement("svg", Object.assign({ className: className, width: width, height: width, viewBox: "0 0 24 24", transform: `rotate(${directions[direction]})` }, rest),
react_1.default.createElement("path", { fill: color, d: "M11.9,0H12V24h-.1a12,12,0,0,1,0-24Z", transform: "translate(0 0.02)" }),
react_1.default.createElement("path", { fill: backgroundColor, d: "M12.1,0H12V24h.1a12,12,0,0,0,0-24Z", transform: "translate(0 0.02)" }),
react_1.default.createElement("circle", { cx: "12", cy: "12", r: "12", fill: "none", stroke: outline })));
};
exports.HalfCircle = HalfCircle;
//# sourceMappingURL=HalfCircle.js.map