question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expose icons as react components

See original GitHub issue

I would love to use these icons in my React projects – beeing able to import them as a component would make this so much fun to use. Maybe feather can be added to react-icons (it already does this, but for other icon libraries)?

Let me know your thoughts on this! 🤔

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:15
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
timolinscommented, Jun 7, 2017

Indeed. I would also recommend keeping the feather repo as barebones as possible. The only thing I would ad in this repo is the way it exposes all icons.

Finding a better way to expose all icons inside the NPM package would make the development of those packages a lot easier…

For example:

import heart from 'feather-icons/heart'
// or
import {heart} from 'feather-icons'

The current approach isn’t really convinient:

import heart from 'feather-icons/icons/core/heart.svg'

I’m not sure if it works this way with the webpack loader, but it would make it much more enjoyable to consume. It even would work in a variety of different frameworks, which makes the other repos less important.

0reactions
colebemiscommented, Jun 8, 2017

Let’s move this conversation to #101 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Icon Component in React - DataDrivenInvestor
The answer is simple theses libraries provide us with hundreds of icons, but we might only require a few, plus the ones that...
Read more >
Icons as React Components - David Gilbertson - Medium
I pass in the icon name as a string, the component then 'looks it up' in my icons object using bracket notation, which...
Read more >
Iconify for React
Loads icons on demand. No need to bundle icons, component will automatically load icon data for icons that you use from Iconify API....
Read more >
React Icons Gets You Access to Hundreds of Open Source Icons
Learn about a React library called React Icons that provides thousands of free, Open Source icons that you can use in your next...
Read more >
Build a Flexible React Icon Component | by Fabian Lee
Today, I will show you how to build a flexible React icon component make use of these packages along with styled-components.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found