Skip to content

[ svg ]: Create createIcon as the base icon for svg #245

Open

Description

@nebula-aac

Current Behavior

Desired Behavior

Implementation

Acceptance Tests

Mockups


Contributor Guide

Activity

  1. Maanvi212006 commented on Aug 26, 2026

    @Maanvi212006
    Contributor

    Current Behavior

    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.

  2. MAYANKSHARMA01010 commented on Aug 26, 2026

    @MAYANKSHARMA01010

    @Maanvi212006 I like to work on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions