Skip to content

Conversation

@zaki-yama
Copy link
Contributor

ref. #289

TODO: after #316 is merged, change base branch to 3.0.

@zaki-yama zaki-yama self-assigned this Jun 21, 2019
@zaki-yama zaki-yama force-pushed the typescript-spinner branch from cb1d516 to c26166e Compare June 21, 2019 22:33
@stomita stomita mentioned this pull request Jun 23, 2019
41 tasks

render() {
const { container, ...props } = this.props;
const { container = true, size = 'small', ...props } = this.props;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stomita
I quit using defaultProps and use destructuring assignment instead.
It works, but I couldn't make use of type check here, it means I can assign any value to both container and size.
If you know any good solution, please tell me.

() => {
// TODO: After https://github.com/storybookjs/storybook/issues/4487 is solved,
// - Add `undefined` to sizeOptions.
// - Change '' to `undefined` in typeOptions.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem that I can't add { '(none)': undefined } to sizeOptions is because of addon-knobs' issue:
addon-knobs select should be able to have undefined options. · Issue #4487 · storybookjs/storybook

First I fixed the component logic itself to work properly if given empty string (b438ac3).
But I thought we shouldn't change the logic for the story.

@zaki-yama
Copy link
Contributor Author

Closed because the last PR #342 had been merged.

@zaki-yama zaki-yama closed this Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants