Skip to content

Commit

Permalink
fix: Add export to react script which broke exports in index.js (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
imprashast committed Nov 22, 2023
1 parent a2306e5 commit 57288c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/output/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ getSVGs().forEach(({ svg, filename, exportName, name }) => {
`import { activateI18n } from '../src/utils/i18n';`,
`activateI18n(enMessages, nbMessages, fiMessages);`,
`const title = i18n.t({ message: \`${message}\`, id: '${id}', comment: '${comment}' });`,
`const ${exportName} = (attrs) => React.createElement('svg', { ${attrs.join(", ")}, dangerouslySetInnerHTML: { __html: ${'`'}${titleHtml}${svg.html}${'`'} }, ...attrs, });`,
`export const ${exportName} = (attrs) => React.createElement('svg', { ${attrs.join(", ")}, dangerouslySetInnerHTML: { __html: ${'`'}${titleHtml}${svg.html}${'`'} }, ...attrs, });`,
`export default ${exportName};`
].join("\n");

Expand Down

0 comments on commit 57288c6

Please sign in to comment.