icons-pack / react-simple-icons

📦 This package provides the Simple Icons packaged as a set of React components.
MIT License
322 stars 19 forks source link

Dynamic import by icon slug #116

Closed pawelmalak closed 3 years ago

pawelmalak commented 3 years ago

Hi, is it possible to import needed icons dynamically using icon slug?

I have this component:

interface Props {
  title: string;
  icon: string;
}

export const BadgeWithIcon = (props: Props): JSX.Element => {
  return (
    <span className='badge bg-primary'>
      {/* ICON */}
      {props.title}
    </span>
  );
}

and I want to insert icon dynamically like that:

<BadgeWithIcon title="ReactJS" icon="reactjs" />
wootsbot commented 3 years ago

@sachinraja is supporting us with a PR to achieve this, @sachinraja is there an update or something we can help with?

pawelmalak commented 3 years ago

Hi. Any updates on this PR?