Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Migrate Storybook to 6.4.0 and enable auto-detection of controls (#5249)
Browse files Browse the repository at this point in the history
Previously our Babel configuration conflicted with the one provided by
default by Storybook, making us unable to leverage the automatic
detection of properties from both JS and TS components to create
controls (formerly known as knobs).

Upgrading to 6.4.0 fixes a bug that makes it easier to work with
Babel configurations. Also done here:

* Removed a few deprecated addons in favor of the replacement ones
bundled within Storybook Essentials.
* Add auto-detection of certain control types depending on the property names
* Add support for TS stories

More context: storybookjs/storybook#12292
  • Loading branch information
sunyatasattva committed Nov 26, 2021
1 parent 7def33d commit 339083e
Show file tree
Hide file tree
Showing 5 changed files with 1,677 additions and 1,367 deletions.
7 changes: 7 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
module.exports = {
plugins: [
[
'react-docgen',
{ DOC_GEN_COLLECTION_NAME: 'STORYBOOK_REACT_CLASSES' },
],
[ '@babel/plugin-syntax-jsx' ],
],
presets: [
[
'@wordpress/babel-preset-default',
Expand Down
Loading

0 comments on commit 339083e

Please sign in to comment.