Skip to content

Commit

Permalink
fix: gen-dom
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Aug 29, 2023
1 parent 55cf9a3 commit 219e633
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/gen-dom/src/index.ts
Expand Up @@ -129,13 +129,13 @@ ${components
export const names = [${components.map((v) => '"' + v.id + '"')}];
export default function IconFont({ name, size, className } = {}) {
export default function IconFont(props = {}) {
switch (name) {
${components
.map((v) => {
const indentSpace = " ".repeat(8);
return `${indentSpace}case '${v.id}': return ${v.componentName}({ size, className });`;
return `${indentSpace}case '${v.id}': return ${v.componentName}(props);`;
})
.join("\n")}
default:
Expand Down

0 comments on commit 219e633

Please sign in to comment.