Releases: styleguidist/react-styleguidist
Releases · styleguidist/react-styleguidist
1.3.0
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
- Use markdown-it and Markdown React instead of Marked.
- A lot of documentation improvements and new examples in the demo style guide.
1.2.1
- Stateless React components support (#44, #46, by @sunesimonsen).
- Avoid conflicts with host projects when using the same component names as in react-styleguidist (#48, by @sunesimonsen).
1.2.0
- New feature: require() support in code examples (#25, by @lovelybooks).
- Show file name under component title (#29, by @lovelybooks).
- New option: skipComponentsWithoutExample (#38, by @panayi).
- PropTypes.arrayOf and PropTypes.instanceOf support (#13, #17, #20).
- A bit better JSX syntax highlighting (#19).
- Add babel-plugin-react-display-name. Should preserve displayName when using React.createComponent (#18).
- Use Babel instead of JSXTransformer to compile examples in the browser (#16).
- Update react-codemirror, fix warnings in React 0.14 (#39).
- Add react-dom as a peer dependency.
- Drop Node 0.10 support.