In this video we're looking at using Node.js as a tool to save time working with files and code, specifically, managing icon svg files and turning them into React components. In the video you will:
- Create an icon components with multiple variants that supports color and className as props.
- Write a script for processing SVGs into React components.
- Write a script for generating an export file for all icon components
- Write a script for re-writing the icon components in the case of adding new props.
Chapters:
00:00 - Project walkthrough
01:55 - Installing dependencies
02:38 - Creating the first icon component
08:37 - Script for processing SVGs into React components
26:15 - Script for generating export file
33:28 - Script for re-writing icon components
GitHub repo: https://github.com/themaxsandelin/component-library/tree/feature/icon-component
---------
Website: https://maxsandelin.com
Instagram: https://instagram.com/themaxsandelin
Threads: https://threads.net/themaxsandelin
Twitter: https://twitter.com/themaxsandelin
Download
0 formats
No download links available.
Saving time with Node.js - Building an Icon component in React | NatokHD