@activecollab/components
Version:
ActiveCollab Components
59 lines (58 loc) • 2.82 kB
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
const _excluded = ["gradient"];
import React from "react";
import { GradientDefs } from "../../GradientDefs";
/**
* @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
*/
const SparkIcon = /*#__PURE__*/React.forwardRef((_ref, svgRef) => {
let {
gradient
} = _ref,
props = _objectWithoutPropertiesLoose(_ref, _excluded);
return /*#__PURE__*/React.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.fill ? props.fill : "var(--color-theme-600)",
focusable: false,
ref: svgRef
}, props), /*#__PURE__*/React.createElement(GradientDefs, {
gradient: gradient
}), /*#__PURE__*/React.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.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";
export default SparkIcon;
//# sourceMappingURL=Spark.js.map