tabler-icons
tabler-icons copied to clipboard
Export the SVG files
What about exporting the SVG files in addition to the React components?
For those using Next.js with SVGR this would allow such usage with dynamic import.
const svg = {
heart: dynamic<SVGProps<SVGSVGElement>>(() =>
import('@tabler/icons/icons/heart.svg').then((mod) => mod.ReactComponent)
),
...
}
const Icon = ({ icon, ...props }) => {
const Svg = svg[icon];
return <Svg {...props} />;
};
@codecalm any opinion?
@simontaisne I want to separate Tabler packages into png, vue, react, etc. By the way I will also take care of this task :)
Sounds great! Looking forward to it 💯
@simontaisne we've added *.svg
files do package.json config, can you try now? :)
https://tabler.io/docs/icons/svelte