Unverified Commit 53e4c0ac authored by Dan Abramov's avatar Dan Abramov Committed by GitHub
Browse files

Format SVG React snapshots as <svg> tag with props (#5196)

* Format SVG React snapshots as <svg> tag with props

* Keep output simpler
parent aa57262f
3 merge requests!12191Lim.Pisey.168:/Identified - We are currently investigating reports of missing build logs. The issue has been identified and a resolution is in progress. We will provide a further update when available.Mar 21, 09:02 UTC,!12853brikk,!5717Automatically extract project file structure from build bundle file
Showing with 9 additions and 1 deletion
+9 -1
......@@ -21,7 +21,15 @@ module.exports = {
return `module.exports = {
__esModule: true,
default: ${assetFilename},
ReactComponent: () => ${assetFilename},
ReactComponent: (props) => ({
$$typeof: Symbol.for('react.element'),
type: 'svg',
ref: null,
key: null,
props: Object.assign({}, props, {
children: ${assetFilename}
})
}),
};`;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment