Make SVGR icons use forward ref (#26082)

pull/26093/head
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
1 changed files with 6 additions and 0 deletions

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,