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

TypeScript Typings - WithWidthEnhancement width should be a string or enum #7826

Closed
vyrotek opened this issue Aug 18, 2017 · 3 comments
Closed

Comments

@vyrotek
Copy link

vyrotek commented Aug 18, 2017

Problem description

@sebald I believe width is supposed to be a string or enum and not a number;

  export interface WithWidthEnhancement {
    width: number;
  }

The withWidth.js implementation seems to provide the following possible values.
xs | xs | sm | md | lg | xl

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 18, 2017

Sounds correct, feel free to fix the typescript typings.

@vyrotek
Copy link
Author

vyrotek commented Aug 18, 2017

I just saw there's a Breakpoint type. Would it make sense to use that @sebald?

@sebald
Copy link
Member

sebald commented Aug 18, 2017

@vyrotek yup, exactly :)

sebald pushed a commit that referenced this issue Aug 24, 2017
sebald added a commit that referenced this issue Aug 24, 2017
…nButton (#7897)

* [typescript] Correct withWidth
* [typescript] Rename WithWidthEnhancement.
* [typescript] Improve typings for `withStyle`
- add `theme`
- enhanced components has "styled props"
* [typescript] Correct BottomNavigationButton typings
value -> any

Closes #7826
Closes #7830
Closes #7889
Taldrain pushed a commit to Taldrain/material-ui that referenced this issue Aug 24, 2017
…nButton (mui#7897)

* [typescript] Correct withWidth
* [typescript] Rename WithWidthEnhancement.
* [typescript] Improve typings for `withStyle`
- add `theme`
- enhanced components has "styled props"
* [typescript] Correct BottomNavigationButton typings
value -> any

Closes mui#7826
Closes mui#7830
Closes mui#7889
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants