Make SVGR icons use forward ref (#26082)

This commit is contained in:
Germain 2023-08-30 18:09:29 +01:00 committed by GitHub
parent 19b2eded16
commit 1ada110fed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -524,6 +524,12 @@ module.exports = (env, argv) => {
removeDimensions: true,
},
},
/**
* Forwards the React ref to the root SVG element
* Useful when using things like `asChild` in
* radix-ui
*/
ref: true,
esModule: false,
name: "[name].[hash:7].[ext]",
outputPath: getAssetOutputPath,