Skip to content

Commit

Permalink
fix: playground component destructuring bug (#4)
Browse files Browse the repository at this point in the history
* ˜fix bug

* remove vscode config

* follow renatorib suggestion
  • Loading branch information
lucasavila00 authored and pedronauck committed Jun 12, 2018
1 parent 23863ac commit f9026cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"eslint.enable": false,
"javascript.validate.enable": false,
"javascript.validate.enable": false
}
10 changes: 6 additions & 4 deletions packages/docz/src/components/Playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ const DefaultRender: RenderComponent = ({ component, code }) => (
)

export const Playground: SFC<PlaygroundProps> = ({
components: { render: Render = DefaultRender },
components: { render: Render = DefaultRender } = {},
children,
__code,
}) => (
<Render component={isFn(children) ? children() : children} code={__code} />
)
}) => {
return (
<Render component={isFn(children) ? children() : children} code={__code} />
)
}

0 comments on commit f9026cf

Please sign in to comment.