mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-12 13:38:32 +00:00
buildLucideIconForReact is the entry point both lucide-react and lucide-react-native use to build an icon, and its whole job is renaming the hyphenated SVG attributes to the spellings React expects. Nothing tested that rename directly: the other build helpers have specs in packages/icons/tests, and this one had none anywhere in the repo. The spec pins the five renames it applies, checks that attributes React already accepts are left alone, that aria-hidden stays hyphenated, that vector-effect is renamed on child nodes for a non-scaling stroke, and that a caller's own attributeNames are merged without displacing the React spellings. Verified that the spec is not vacuous: removing the class -> className entry from the rename map fails two of the five tests. Co-authored-by: Vugar Bakhishov <vugarbbakhishov-hub@users.noreply.github.com> Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
@lucide/shared
A collection of shared internal utilities for Lucide.