Skip to content

Commit

Permalink
fix: fix rendered code when user defined props are not passed (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
godnondsilva authored Mar 21, 2024
1 parent f443004 commit 173e593
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ type Props = {
${renderProps(parsedInput)}
} & JSX.IntrinsicElements['${parsedInput.tag}']
export function ${name}({ children, ${Object.keys(parsedInput.data).join(
', ',
)}, ...props }: Props) {
export function ${name}({ ${[
'children',
...Object.keys(parsedInput.data),
'...props',
].join(', ')} }: Props) {
return (
<${parsedInput.tag} {...props} className="${parsedInput.className}" ${Object.keys(
parsedInput.data,
Expand Down

0 comments on commit 173e593

Please sign in to comment.