Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow edit code inside playground #205

Merged
merged 5 commits into from
Aug 9, 2018
Merged

Conversation

pedronauck
Copy link
Member

No description provided.

@pedronauck pedronauck merged commit 4f948f7 into dev Aug 9, 2018
@pedronauck pedronauck deleted the feat/edit-playground branch August 9, 2018 21:14
pedronauck added a commit that referenced this pull request Aug 10, 2018
* 'dev' of github.com:pedronauck/docz:
  feat: allow edit code inside playground (#205)
  fix(rehype-docz): allow ticks and backticks inside playground (#203)
@wachunga
Copy link

wachunga commented Oct 2, 2018

Is this documented anywhere? I was expecting to see an option in https://www.docz.site/documentation/components-api#playground

@huchenme
Copy link

seems it is not working in 0.13

@chaseadamsio
Copy link

chaseadamsio commented Feb 8, 2019

it does work if you wrap it in a closure:

<Playground>
  {() => {
    const someVar = 'value'
    return <MyComponent example={someVar} />
  }}
</Playground>

gives you an editable field for that code. Probably should be documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants