@cimpress/react-components
Version:
React components to support the MCP styleguide
31 lines • 1.69 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.RadioIcon = void 0;
const react_1 = __importDefault(require("react"));
const css_1 = require("@emotion/css");
const cvar_1 = __importDefault(require("../theme/cvar"));
const checkShapeStyles = (0, css_1.css) `
display: var(--crc-radio-icon-display, none);
`;
const RadioIcon = (props) => {
const { size = '16px', color = (0, cvar_1.default)('color-button-primary'), backgroundColor = 'none', className = '' } = props, rest = __rest(props, ["size", "color", "backgroundColor", "className"]);
return (react_1.default.createElement("svg", Object.assign({ width: size, height: size, viewBox: "0 0 24 24", className: className }, rest),
react_1.default.createElement("circle", { cx: "12", cy: "12", r: "10", stroke: color, strokeWidth: "2", fill: backgroundColor }),
react_1.default.createElement("circle", { className: checkShapeStyles, cx: "12", cy: "12", r: "5", fill: color })));
};
exports.RadioIcon = RadioIcon;
//# sourceMappingURL=RadioIcon.js.map