@activecollab/components
Version:
ActiveCollab Components
78 lines (77 loc) • 2.92 kB
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
const _excluded = ["gradient"];
import React, { useState } from "react";
import { GradientDefs } from "../../GradientDefs";
let maskUid = 0;
/**
* @component GitRepositoryConnectIcon
* @description
* Outline repository glyph (a stacked database cylinder) with a cutout in the
* upper-right corner holding a small plug badge — used to signify connecting /
* linking a repository.
*
* @prop {string} [gradient] - Optional CSS linear-gradient string applied to the stroke.
*
* @see https://design.activecollab.com/docs/foundations/icons
*/
const GitRepositoryConnectIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
let gradient = _ref.gradient,
props = _objectWithoutPropertiesLoose(_ref, _excluded);
const _useState = useState(() => "git-repository-connect-cut-" + ++maskUid),
maskId = _useState[0];
return /*#__PURE__*/React.createElement("svg", _extends({
xmlns: "http://www.w3.org/2000/svg",
width: 24,
height: 24,
viewBox: "0 0 24 24",
"data-testid": "GitRepositoryConnectIcon",
fill: "none",
stroke: gradient ? "url(#icon-gradient)" : props != null && props.stroke ? props.stroke : "var(--color-theme-600)",
strokeWidth: 2,
strokeLinecap: "round",
strokeLinejoin: "round",
focusable: false,
ref: ref
}, props), /*#__PURE__*/React.createElement(GradientDefs, {
gradient: gradient
}), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("mask", {
id: maskId
}, /*#__PURE__*/React.createElement("rect", {
x: 0,
y: 0,
width: 24,
height: 24,
fill: "#fff",
stroke: "none"
}), /*#__PURE__*/React.createElement("circle", {
cx: 18.8,
cy: 4.6,
r: 5.5,
fill: "#000",
stroke: "none"
}))), /*#__PURE__*/React.createElement("g", {
mask: "url(#" + maskId + ")"
}, /*#__PURE__*/React.createElement("path", {
d: "M12 4m-8 0a8 2 0 1 0 16 0a8 2 0 1 0 -16 0"
}), /*#__PURE__*/React.createElement("path", {
d: "M4 4v5a8 2 0 0 0 16 0v-5"
}), /*#__PURE__*/React.createElement("path", {
d: "M4 9v5a8 2 0 0 0 16 0v-5"
}), /*#__PURE__*/React.createElement("path", {
d: "M4 14v5a8 2 0 0 0 16 0v-5"
})), /*#__PURE__*/React.createElement("g", {
transform: "rotate(45 18.8 4.6)"
}, /*#__PURE__*/React.createElement("path", {
d: "M17.6 1.9v1.4"
}), /*#__PURE__*/React.createElement("path", {
d: "M20 1.9v1.4"
}), /*#__PURE__*/React.createElement("path", {
d: "M16.7 3.3h4.2v1.5a2.1 2.1 0 0 1 -2.1 2.1a2.1 2.1 0 0 1 -2.1 -2.1z"
}), /*#__PURE__*/React.createElement("path", {
d: "M18.8 6.9v1.6"
})));
});
GitRepositoryConnectIcon.displayName = "GitRepositoryConnectIcon";
export default GitRepositoryConnectIcon;
//# sourceMappingURL=GitRepositoryConnect.js.map