icons-pack / react-simple-icons

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

Feature Request: Add Export for Default Icon Colors #195

Closed Lexizz7 closed 10 months ago

Lexizz7 commented 11 months ago

Currently, it would be extremely helpful to have the option to import the default hex color of an icon. This feature could be really useful for creating more dynamic and appealing interfaces. Rather than manually obtaining the hex codes from the Simple Icons website, I would like a feature that automatically exports the hex color value. Something like:

import { SiReact, SiReactHex } from '@icons-pack/react-simple-icons';

function BasicExample() {
  return (
    <Button color={SiReactHex} />
      <SiReact />
      React Button
    </Button>
  );
}

I'm not sure if this could be useful for more users, but in my project we use it a lot. Also, I don't know the negative impact (maybe the lib size)

wootsbot commented 11 months ago

@Lexizz7 I think it's a good idea, I'll take the time to include this feature.

Remember that your contributions are welcome, feel free to send a pr if you see it necessary.

wootsbot commented 10 months ago

close: https://github.com/icons-pack/react-simple-icons/pull/197