github styleguidist/react-styleguidist 1.3.0

latest releases: v13.1.2, v13.1.1, v13.1.0...
8 years ago

New features

Per examples state

Each example has its own state that you can access at the state variable and change with the setState function. Default state is {}.

<div>
  <button onClick={() => setState({isOpen: true})}>Open</button>
  <Modal isOpen={state.isOpen}>
    <h1>Hallo!</h1>
    <button onClick={() => setState({isOpen: false})}>Close</button>
  </Modal>
</div>

Related issue: #45.

Ability to style a style guide

Now you can change almost any piece of a style guide. For example you can change a font and a background color:

.ReactStyleguidist-common__font {
  font-family: "Comic Sans MS", "Comic Sans", cursive;
}
.ReactStyleguidist-colors__base-bg {
  background: hotpink;
}

More in the docs.

Related issue: #32

Other new features

  • Table of contents (#28).
  • Ability to use Markdown in components and props descriptions (#32).
  • PropTypes.shape support (#20).
  • Ability to change path line via getComponentPathLine option (#41).

Bug fixes

  • Improved styles isolation: Styleguidist styles should not interfer with your components styles.
  • Removed sanitize.css that causes a lot of problems with component styles.
  • Fixed issue when using components with the same names as component in Styleguidist.

Other changes

Don't miss a new react-styleguidist release

NewReleases is sending notifications on new releases.