Skip to content

Commit

Permalink
UnitControl: convert Storybook example to TypeScript and Controls (#…
Browse files Browse the repository at this point in the history
…39320)

* Rename extension

* Comment out advanced stories

* Add props to `UnitControl`s types (`hideLabelFromVision`, `isShiftStepEnabled`, `shiftStep`)

* Rewrite default story with TypeScript and Controls

* Use unconnected component for Storybook

* Add missing stories

* Add missing default values

* Update docs

* Rename `UnconnectedUnitControl` =>` UnforwardedUnitControl`

* Add a label to the default storybook args

* Stop using `noop` for callback fallaback values

* Show unstable props in docs

* Wrap default string value in quotes

* Disable `jsdoc/require-param` rule for Storybook stories

* More `WithCustomUnits` description to JSDoc

* Hide `value` s controls (as it is a controlled component)

* Refine controls for unstable props

* Add `@storybook/addon-actions` to the project

* Add `onClick` to Actions tab
  • Loading branch information
ciampo committed Mar 15, 2022
1 parent cecd782 commit a1869bc
Show file tree
Hide file tree
Showing 10 changed files with 634 additions and 187 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,5 +248,12 @@ module.exports = {
'jsdoc/valid-types': 'off',
},
},
{
files: [ '**/@(storybook|stories)/*' ],
rules: {
// Useful to add story descriptions via JSdoc without specifying params.
'jsdoc/require-param': 'off',
},
},
],
};
Loading

0 comments on commit a1869bc

Please sign in to comment.