@pathwright/pathicons
Version:
Pathwright icons, synced from Figma to React components
60 lines (57 loc) • 3.12 kB
JavaScript
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
import React, { useId } from 'react';
import PropTypes from 'prop-types';
import { jsxs, jsx } from 'react/jsx-runtime';
var _excluded = ["color", "size"];
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var XSquareIcon = /*#__PURE__*/React.forwardRef(function XSquareIcon(props, ref) {
var color = props.color,
size = props.size,
otherProps = _objectWithoutProperties(props, _excluded);
var clipPathId = useId();
return /*#__PURE__*/jsxs("svg", _objectSpread(_objectSpread({
ref: ref,
xmlns: "http://www.w3.org/2000/svg",
width: size,
height: size,
viewBox: "0 0 24 24",
fill: color
}, otherProps), {}, {
children: [/*#__PURE__*/jsxs("g", {
clipPath: "url(#".concat(clipPathId, ")"),
children: [/*#__PURE__*/jsx("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M6 2C3.80228 2 2 3.80228 2 6V18C2 20.1977 3.80228 22 6 22H18C20.1977 22 22 20.1977 22 18V6C22 3.80228 20.1977 2 18 2H6ZM0 6C0 2.69772 2.69772 0 6 0H18C21.3023 0 24 2.69772 24 6V18C24 21.3023 21.3023 24 18 24H6C2.69772 24 0 21.3023 0 18V6Z"
}), /*#__PURE__*/jsx("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M15.7071 8.29289C16.0976 8.68342 16.0976 9.31658 15.7071 9.70711L9.70711 15.7071C9.31658 16.0976 8.68342 16.0976 8.29289 15.7071C7.90237 15.3166 7.90237 14.6834 8.29289 14.2929L14.2929 8.29289C14.6834 7.90237 15.3166 7.90237 15.7071 8.29289Z"
}), /*#__PURE__*/jsx("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M8.29289 8.29289C8.68342 7.90237 9.31658 7.90237 9.70711 8.29289L15.7071 14.2929C16.0976 14.6834 16.0976 15.3166 15.7071 15.7071C15.3166 16.0976 14.6834 16.0976 14.2929 15.7071L8.29289 9.70711C7.90237 9.31658 7.90237 8.68342 8.29289 8.29289Z"
})]
}), /*#__PURE__*/jsx("defs", {
children: /*#__PURE__*/jsx("clipPath", {
id: clipPathId,
children: /*#__PURE__*/jsx("path", {
fill: "white",
d: "M0 0H24V24H0z"
})
})
})]
}));
});
XSquareIcon.propTypes = {
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
};
XSquareIcon.defaultProps = {
color: 'currentColor',
size: '24'
};
export { XSquareIcon as default };
//# sourceMappingURL=x-square.js.map