@activecollab/components
Version:
ActiveCollab Components
64 lines (63 loc) • 3.77 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _GradientDefs = require("../../GradientDefs");
var _excluded = ["gradient"];
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
/**
* @component SparkIcon
* @description
*
* The React Icon component is a visual element that displays an icon to represent a concept, object, or action.
* The Icon component is
* customizable, allowing for variations in size, color, and style to fit the needs of the application.
*
* @prop {string} [gradient] - Optional CSS linear-gradient string to apply a custom fill.
* Format: "linear-gradient(<angle>deg, <color1>, <color2>, ...)"
*
* @example
* return (
* <SparkIcon gradient="linear-gradient(135deg, #4da2ed, #f72222)" />
* )
*
* @example
* return (
* <SparkIcon className="mr-2" />
* )
*
* @see
* https://system.activecollab.com/?path=/story/foundation-icons-icons--icons
* @see
* https://design.activecollab.com/docs/foundations/icons
*/
var SparkIcon = /*#__PURE__*/_react.default.forwardRef(function (_ref, svgRef) {
var gradient = _ref.gradient,
props = _objectWithoutProperties(_ref, _excluded);
return /*#__PURE__*/_react.default.createElement("svg", _extends({
xmlns: "http://www.w3.org/2000/svg",
width: 24,
height: 24,
viewBox: "0 0 24 24",
"data-testid": "SparkIcon",
fill: gradient ? "url(#icon-gradient)" : props !== null && props !== void 0 && props.fill ? props.fill : "var(--color-theme-600)",
focusable: false,
ref: svgRef
}, props), /*#__PURE__*/_react.default.createElement(_GradientDefs.GradientDefs, {
gradient: gradient
}), /*#__PURE__*/_react.default.createElement("path", {
fillRule: "evenodd",
d: "M11.616 3.523c.082-.232.442-.232.524 0a15.2 15.2 0 003.574 5.643 15.241 15.241 0 005.428 3.498l.212.078c.231.082.232.44 0 .522l-.212.077a15.233 15.233 0 00-5.428 3.497 15.263 15.263 0 00-3.363 5.081l-.132.346-.077.212-.019.041c-.1.177-.385.177-.485 0l-.019-.04-.078-.213-.134-.346a15.291 15.291 0 00-3.365-5.08 15.265 15.265 0 00-5.284-3.446l-.358-.13c-.232-.082-.232-.443 0-.524a15.194 15.194 0 005.642-3.573 15.198 15.198 0 003.574-5.643zm.262 4.017a17.346 17.346 0 01-2.421 3.04A17.338 17.338 0 016.415 13a17.388 17.388 0 013.041 2.424 17.404 17.404 0 012.423 3.04 17.343 17.343 0 012.42-3.04 17.36 17.36 0 013.04-2.422 17.37 17.37 0 01-3.04-2.422 17.363 17.363 0 01-2.421-3.04z",
clipRule: "evenodd"
}), /*#__PURE__*/_react.default.createElement("path", {
d: "M19.707 2.103c.037-.094.19-.094.226 0A4.194 4.194 0 0022.31 4.48c.094.037.094.19 0 .227a4.19 4.19 0 00-2.377 2.376c-.036.094-.189.094-.225 0a4.195 4.195 0 00-2.377-2.376c-.094-.037-.094-.19 0-.227a4.186 4.186 0 002.376-2.377z"
}));
});
SparkIcon.displayName = "SparkIcon";
var _default = exports.default = SparkIcon;
//# sourceMappingURL=Spark.js.map