Skip to content

Commit

Permalink
User can copy JSON config from Playground. (prettier#5295)
Browse files Browse the repository at this point in the history
  • Loading branch information
beausmith authored and j-f1 committed Oct 25, 2018
1 parent 1234ceb commit 6e0de08
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions website/playground/Playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ class Playground extends React.Component {
{editorState.showSidebar ? "Hide" : "Show"} options
</Button>
<Button onClick={this.clearContent}>Clear</Button>
<ClipboardButton copy={JSON.stringify(options, null, 2)}>
Copy config JSON
</ClipboardButton>
</div>
<div className="bottom-bar-buttons bottom-bar-buttons-right">
<ClipboardButton copy={window.location.href}>
Expand Down

0 comments on commit 6e0de08

Please sign in to comment.