opengovsg / camp-design-system

The Design System used at Open Government Products
https://design.open.gov.sg
39 stars 11 forks source link

fix mask ids in react svgr components generated by SVGR #278

Open karrui opened 1 year ago

karrui commented 1 year ago

Most (if not all) of our SVG React components are generated with SVGR. Using SVGR generates ids to the mask groups inside the given SVG, which are extremely likely to clash if there are two SVGRs in the same html layout, resulting in the later declaration of id properties to be used for the wrong SVGs.

We should take a look at all the SVG React components to name the mask ids to something less likely to clash.

See related issue in https://github.com/opengovsg/FormSG/pull/5749

karrui commented 1 year ago

Will regenerate all SVGR generated icons with SVGO option cleanupIds set to false