You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[ svg ]: Create createIcon as the base icon for svg #245
Each icon in src/icons/ is a standalone component that hand-rolls the same boilerplate — e.g. GithubIcon individually defines its own height, width, fill, viewBox, and className props, and wraps a raw <svg> element with this logic repeated per icon. There's no shared factory or base abstraction; every new icon means copy-pasting this wrapper code again.
Desired Behavior
A createIcon base function/factory that:
Accepts the icon's raw path/shape data (and viewBox, if it varies) as input
Returns a ready-to-use React icon component with the standard shared props already wired up (height, width, fill, className, and any other common prop conventions used across existing icons)
Reduces each individual icon file to a small declarative call (e.g. createIcon({ viewBox: '...', path: '...' })) instead of a full component definition
This mirrors the common pattern used by icon libraries (e.g. lucide-react, MUI's createSvgIcon) — a single factory that standardizes prop handling so individual icons stay minimal.
Activity
Maanvi212006 commentedon Aug 26, 2026
Current Behavior
Each icon in
src/icons/is a standalone component that hand-rolls the same boilerplate — e.g.GithubIconindividually defines its ownheight,width,fill,viewBox, andclassNameprops, and wraps a raw<svg>element with this logic repeated per icon. There's no shared factory or base abstraction; every new icon means copy-pasting this wrapper code again.Desired Behavior
A
createIconbase function/factory that:height,width,fill,className, and any other common prop conventions used across existing icons)createIcon({ viewBox: '...', path: '...' })) instead of a full component definitionThis mirrors the common pattern used by icon libraries (e.g.
lucide-react, MUI'screateSvgIcon) — a single factory that standardizes prop handling so individual icons stay minimal.MAYANKSHARMA01010 commentedon Aug 26, 2026
@Maanvi212006 I like to work on this