@carbon/icons-react
Version:
React components for icons in digital and software products using the Carbon Design System
84 lines (83 loc) • 3.27 kB
JavaScript
/**
* Copyright IBM Corp. 2016, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* Code generated by @carbon/icon-build-helpers. DO NOT EDIT.
*/
//#region \0rolldown/runtime.js
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
key = keys[i];
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
get: ((k) => from[k]).bind(null, key),
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
});
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
value: mod,
enumerable: true
}) : target, mod));
//#endregion
let _carbon_icon_helpers = require("@carbon/icon-helpers");
let prop_types = require("prop-types");
prop_types = __toESM(prop_types);
let react = require("react");
react = __toESM(react);
//#region virtual:./Icon.tsx
/**
* Copyright IBM Corp. 2019, 2026
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
const Icon = (0, react.forwardRef)(function Icon({ className, children, tabIndex, xmlns = "http://www.w3.org/2000/svg", preserveAspectRatio = "xMidYMid meet", ...rest }, ref) {
const { tabindex, ...attrs } = (0, _carbon_icon_helpers.getAttributes)({
...rest,
tabindex: tabIndex
});
const props = attrs;
if (className) props.className = className;
if (tabindex !== void 0 && tabindex !== null) if (typeof tabindex === "number") props.tabIndex = tabindex;
else props.tabIndex = Number(tabIndex);
if (ref) props.ref = ref;
if (xmlns) props.xmlns = xmlns;
if (preserveAspectRatio) props.preserveAspectRatio = preserveAspectRatio;
return react.default.createElement("svg", props, children);
});
Icon.displayName = "Icon";
Icon.propTypes = {
"aria-hidden": prop_types.default.oneOfType([prop_types.default.bool, prop_types.default.oneOf(["true", "false"])]),
"aria-label": prop_types.default.string,
"aria-labelledby": prop_types.default.string,
children: prop_types.default.node,
className: prop_types.default.string,
height: prop_types.default.oneOfType([prop_types.default.number, prop_types.default.string]),
preserveAspectRatio: prop_types.default.string,
tabIndex: prop_types.default.oneOfType([prop_types.default.number, prop_types.default.string]),
viewBox: prop_types.default.string,
width: prop_types.default.oneOfType([prop_types.default.number, prop_types.default.string]),
xmlns: prop_types.default.string
};
//#endregion
Object.defineProperty(exports, "Icon", {
enumerable: true,
get: function() {
return Icon;
}
});
Object.defineProperty(exports, "__toESM", {
enumerable: true,
get: function() {
return __toESM;
}
});