@activecollab/components
Version:
ActiveCollab Components
57 lines (56 loc) • 2.46 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 ShieldIcon
* @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 (
* <ShieldIcon gradient="linear-gradient(135deg, #4da2ed, #f72222)" />
* )
*
* @example
* return (
* <ShieldIcon className="mr-2" />
* )
*
* @see
* https://system.activecollab.com/?path=/story/foundation-icons-icons--icons
* @see
* https://design.activecollab.com/docs/foundations/icons
*/
const ShieldIcon = /*#__PURE__*/React.forwardRef((_ref, svgRef) => {
let {
gradient
} = _ref,
props = _objectWithoutPropertiesLoose(_ref, _excluded);
return /*#__PURE__*/React.createElement("svg", _extends({
width: 24,
height: 24,
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
"data-testid": "ShieldIcon",
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",
clipRule: "evenodd",
d: "M11.873 4.063c.084-.01.17-.01.254 0l5.92.741c.563.07.962.584.892 1.147l-1.18 9.442c-.033.272-.175.52-.392.687l-4.741 3.652a1.026 1.026 0 01-1.252 0L6.633 16.08a1.028 1.028 0 01-.393-.687L5.061 5.951a1.027 1.027 0 01.891-1.147l5.92-.74zm.509-2.04a3.076 3.076 0 00-.764 0l-5.92.742a3.082 3.082 0 00-2.674 3.441l1.179 9.442c.102.817.526 1.56 1.178 2.061l4.741 3.652a3.077 3.077 0 003.756 0l4.741-3.652a3.084 3.084 0 001.178-2.061l1.179-9.442a3.082 3.082 0 00-2.674-3.441l-5.92-.741zm3.825 8.684a1 1 0 10-1.414-1.414l-3.71 3.71-1.302-1.628a1 1 0 10-1.562 1.25l1.302 1.627a2 2 0 002.976.165l3.71-3.71z"
}));
});
ShieldIcon.displayName = "ShieldIcon";
export default ShieldIcon;
//# sourceMappingURL=Shield.js.map