Skip to content

1.3.0

Compare
Choose a tag to compare
@sapegin sapegin released this 02 Dec 09:04
· 1940 commits to master since this release

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