Skip to content

Releases: styleguidist/react-styleguidist

3.0.2

28 Jul 14:17
Compare
Choose a tag to compare
  • Fixed: React warning “ref is not a prop” (#159).

3.0.1

18 Jul 12:43
Compare
Choose a tag to compare
  • Fixed: React error about missed props on first render when using initialState (#155).
  • Fixed: content and components path resolving inconsistency (#137)
  • Fixed: React error when two components have the same name (#33).
  • Improved: shape[] prop type rendering (#73).

3.0.0

06 Jul 13:48
Compare
Choose a tag to compare

Breaking changes

Improved state

Previously setState in examples was causing component rerender which was braking animation and other things.

Default state definition was changed. Instead of:

'count' in state || setState({ count : 1})

You should do:

initialState = { count: 1 };

(#51, #134 by @saschatimme)

Collapsible code examples

Now code examples are collapsed by default, you can change it by showCode option.

(#86, #150 by @tizmagik)

New features

Basic isolated links implementation

Now you can open any component in a separate page:

The UI requires more work, any help is appreciated.

Other changes and fixes

  • Allow markdown ```example to render interactive example (#151 by @uipoet).
  • Very basic HTML support in examples (#141).
  • Update CodeMirror, remove custom JSX mode (#19).
  • Avoid React error about void elements with children, fixes images in Markdown (#140).

2.3.1

06 Jun 13:58
Compare
Choose a tag to compare
  • Internal: ability to change config file location.

v2.3.0

24 May 16:58
Compare
Choose a tag to compare

New features

Default examples

For components that do not have an example, a default one can be used. See defaultExample option for details.

(#144 by @tizmagik)

Other changes and fixes

v2.2.2

12 May 19:38
Compare
Choose a tag to compare

2.2.1

22 Apr 05:52
Compare
Choose a tag to compare
  • Fixed: npm2 compatibility (#131, #132 by @mik01aj).
  • Add classes for styling TR and TBODY tags in Markdown (#130).

2.2.0

20 Apr 07:18
Compare
Choose a tag to compare

New features

Sections

Allows you to group components into sections and add random Markdown files to your style guide:

module.exports = {
  // ...
  sections: [
    {name: 'Introduction', content: 'docs/introduction.md'},
    {name: 'UI Components', content: 'docs/ui.md', components: 'lib/components/ui/*.js'}
  ]
}

See example style guide.

PRs: #108 by @paulj, #119, #120 by @karlbright.

Experimental isolated mode

Try to open your styleguide like http://localhost:3000/#!/Button and only one component will be rendered (#123 by @karlbright).

Example doclets support

Now you can add additional examples to your components from external files:

/**
 * Component is described here.
 * @example ./extra.examples.md
 */
export default class SomeComponent extends React.Component {
  // ...
}

PRs: #109 by @paulj.

Ability to change react-docgen behavior

New options: resolver, handler, propsParser.

PRs: #106 by @paulj, #118 by @vslinko.

Other changes and fixes

  • Should work fine in React 15.0.
  • Filter in the sidebar uses fuzzy search.
  • Mark required props insted of optional in a props table (#102 by @CompuIves)
  • Fixed: union elements share same key (#111, #112).
  • Fixed CSS hook for Li tag (#101).

2.1.0

03 Mar 13:27
Compare
Choose a tag to compare

New features

  • You can filter componets by name in the sidebar (#95 by @zammer).

Other changes and fixes

2.0.1

24 Feb 11:17
Compare
Choose a tag to compare
  • Fix Node 0.12 compatibility.
  • styleguidist build exits with an error code when build fails.