Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX some dependencies & ts problems on next #9603

Merged
merged 2 commits into from
Jan 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/cra-kitchen-sink/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
addons: [
'@storybook/preset-create-react-app',
{
name: '@storybook/addon-docs/preset',
options: {
Expand Down
6 changes: 5 additions & 1 deletion examples/cra-react15/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
module.exports = {
stories: ['../src/stories/welcome.stories', '../src/stories/**/button.stories.js'],
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
addons: [
'@storybook/preset-create-react-app',
Copy link
Member Author

Choose a reason for hiding this comment

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

This starts using the new cra preset, we'll be removing the included one in the app/react in 6.0.0

The embedded preset has a problem with the css-mini-extract plugin

'@storybook/addon-actions',
'@storybook/addon-links'
],
};
2 changes: 1 addition & 1 deletion examples/cra-ts-kitchen-sink/src/stories/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface ButtonProps {
/**
* default is false
*/
secondary: boolean;
secondary?: boolean;
Copy link
Member Author

Choose a reason for hiding this comment

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

In the story this prop isn't provided, so apparently it's optional

}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/components/src/tabs/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const panelProps = {

const childrenToList = (children: any, selected: string) =>
Children.toArray(children).map(
({ props: { title, id, color, children: childrenOfChild } }, index) => {
({ props: { title, id, color, children: childrenOfChild } }: React.ReactElement, index) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Seems like before in the react typings this was only React.ReactElement, but in the new typings it can also be things like portals, and strings.

We'll likely have to deal with that at some point, but for now make the typings work.

const content = Array.isArray(childrenOfChild) ? childrenOfChild[0] : childrenOfChild;
return {
active: selected ? id === selected : index === 0,
Expand Down
Loading