All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.cjs.components.icon.create-icon.cjs Maven / Gradle / Ivy

"use strict";
"use client";
'use strict';

var jsxRuntime = require('react/jsx-runtime');
var React = require('react');
var icon = require('./icon.cjs');

function createIcon(options) {
  const {
    viewBox = "0 0 24 24",
    d: pathDefinition,
    displayName,
    defaultProps = {}
  } = options;
  const path = React.Children.toArray(options.path);
  const Comp = React.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
    icon.Icon,
    {
      ref,
      asChild: false,
      viewBox,
      ...defaultProps,
      ...props,
      children: path.length ? path : /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "currentColor", d: pathDefinition })
    }
  ));
  Comp.displayName = displayName;
  return Comp;
}

exports.createIcon = createIcon;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy