@carbon/icons-react
Version:
React components for icons in digital and software products using the Carbon Design System
53 lines (51 loc) • 2.19 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.
*/
const require_chunk = require('./chunk-CsKB0u1v.js');
let _carbon_icon_helpers = require("@carbon/icon-helpers");
let prop_types = require("prop-types");
prop_types = require_chunk.__toESM(prop_types);
let react = require("react");
react = require_chunk.__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
module.exports = Icon;