UNPKG

@mynaui/icons-react

Version:

1180+ beautifully crafted open source icons for your next project.

38 lines (34 loc) 1.02 kB
/** * @mynaui/icons-react v0.4.1 - MIT */ import { forwardRef, createElement } from 'react'; import PropTypes from 'prop-types'; var createReactSolidComponent = (iconName, iconNamePascal, iconNode) => { const Component = forwardRef( ({ color = "currentColor", size = 24, children, ...rest }, ref) => createElement( "svg", { ref, width: size, height: size, fill: color, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...rest }, [ ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)), ...children || [] ] ) ); Component.propTypes = { color: PropTypes.string, size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), stroke: PropTypes.oneOfType([PropTypes.string, PropTypes.number]) }; Component.displayName = `${iconNamePascal}`; return Component; }; export { createReactSolidComponent as default }; //# sourceMappingURL=createReactSolidComponent.js.map