UNPKG

@carbon/icons-react

Version:

React components for icons in digital and software products using the Carbon Design System

79 lines (68 loc) 2.46 kB
/** * 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. */ 'use strict'; var iconHelpers = require('@carbon/icon-helpers'); var PropTypes = require('prop-types'); var React = require('react'); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes); var React__default = /*#__PURE__*/_interopDefaultLegacy(React); /** * Copyright IBM Corp. 2019, 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. */ const Icon = /*#__PURE__*/React__default["default"].forwardRef(function Icon(_ref, ref) { let { className, children, tabIndex, ...rest } = _ref; const { tabindex, ...props } = iconHelpers.getAttributes({ ...rest, tabindex: tabIndex }); if (className) { props.className = className; } if (tabindex !== undefined && tabindex !== null) { props.tabIndex = tabindex; } if (ref) { props.ref = ref; } return /*#__PURE__*/React__default["default"].createElement('svg', props, children); }); Icon.displayName = 'Icon'; Icon.propTypes = { 'aria-hidden': PropTypes__default["default"].string, 'aria-label': PropTypes__default["default"].string, 'aria-labelledby': PropTypes__default["default"].string, children: PropTypes__default["default"].node, className: PropTypes__default["default"].string, height: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]), preserveAspectRatio: PropTypes__default["default"].string, tabIndex: PropTypes__default["default"].string, viewBox: PropTypes__default["default"].string, width: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]), xmlns: PropTypes__default["default"].string }; Icon.defaultProps = { xmlns: 'http://www.w3.org/2000/svg', preserveAspectRatio: 'xMidYMid meet' }; const iconPropTypes = { size: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]) }; exports.Icon = Icon; exports.iconPropTypes = iconPropTypes;