Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

docs(prettier): add prettier support #568

Merged
merged 2 commits into from
Dec 6, 2018
Merged

docs(prettier): add prettier support #568

merged 2 commits into from
Dec 6, 2018

Conversation

levithomason
Copy link
Member

@levithomason levithomason commented Dec 6, 2018

This PR adds prettier support to the docs. All JSX and HTML is formatted.

  1. Removed beautify-js, replaced with prettier

  2. Fixed all <CodeSnippet /> and <ExampleSnippet /> errors and added auto formatting. This also now auto prints the JSX using react-element-to-jsx-string, so there is no need to define both value as a multi-line string and provide a render prop to render content. Just render the content and the string will be computed.
    image

  3. Improved doc example layout and rendering of HTML:
    image

  4. Each doc example has a ✓ Prettier button in the upper right
    http://g.recordit.co/uxcInhWppA.gif

  5. Removed "close on click outside" for doc examples. This always gets in the way. I also reduced a lot of complexity in the <Editor /> component and <ComponentExample /> in doing this.

  6. Removed 160 lines from the repo in the process :D

@DustyTheBot
Copy link
Collaborator

Warnings
⚠️ There are no updates provided to CHANGELOG. Ensure there are no publicly visible changes introduced by this PR.

Generated by 🚫 dangerJS

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

Successfully merging this pull request may close these issues.

2 participants