Skip to content

Conversation

typescribe
Copy link
Contributor

@typescribe typescribe commented Aug 8, 2019

This PR adds proper typescript support to Storybook stories.

  • Update storybook to 5.x
  • Strip down babel config and make use of core-js@3.x
  • Change all stories to typescript

@typescribe typescribe marked this pull request as ready for review August 8, 2019 17:41
import spacing from '@material-ui/core/styles/spacing'

export const theme = {
declare module '@material-ui/core/styles/createPalette' {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These were resolved via https://material-ui.com/guides/typescript/#customization-of-theme. But could definitely use some eyes on this since I'm not familiar with CSS styling. @NavyAdmiral @rupurt

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome! Been annoying not having types for these

'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-throw-expressions',
'@babel/plugin-proposal-class-properties'
overrides: [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was the only way I could get preset-env options properly merged, for some reason I have to define it once within the preset array then again within overrides->presets. Could use some eyes here too @NavyAdmiral @rupurt

@typescribe typescribe changed the title Refactor/styleguide typescript Convert all storybook stories to typescript Aug 8, 2019
Copy link
Contributor

@rupurt rupurt left a comment

Choose a reason for hiding this comment

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

Can confirm it boots up and works 🍷

import spacing from '@material-ui/core/styles/spacing'

export const theme = {
declare module '@material-ui/core/styles/createPalette' {
Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome! Been annoying not having types for these

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