We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
createStyles()
According to the documentation, createStyles() should accept either a function or an object, but the TypeScript definition accept an object only.
The TypeScript definition of createStyles() should also accept a function.
CodeSandbox reproduction: https://codesandbox.io/s/sparkling-moon-yrppz?file=/src/index.ts
The text was updated successfully, but these errors were encountered:
createStyles<IStylesClassKey, IStylesProps>(() => {
We don't accept a function without an argument. The function signature is only useful if you're using the theme:
-createStyles<IStylesClassKey, IStylesProps>(() => { +createStyles<IStylesClassKey, IStylesProps>(theme => {
Sorry, something went wrong.
createStyles<IStylesClassKey, IStylesProps>(() => { We don't accept a function without an argument. The function signature is only useful if you're using the theme: -createStyles<IStylesClassKey, IStylesProps>(() => { +createStyles<IStylesClassKey, IStylesProps>(theme => {
@eps1lon No, TypeScript STILL throws an error after adding the argument. TypeScript doesn't care if the arguments were omitted or not.
Don't you read the description of the issue?
Current Behavior 😯 According to the documentation, createStyles() should accept either a function or an object, but the TypeScript definition accept an object only.
@eps1lon Is this what you called "working properly"?
Right, the API docs are wrong. See our TypeScript guide for the correct usage of createStyles
createStyles
Successfully merging a pull request may close this issue.
Current Behavior 😯
According to the documentation,
createStyles()
should accept either a function or an object, but the TypeScript definition accept an object only.Expected Behavior 🤔
The TypeScript definition of
createStyles()
should also accept a function.Steps to Reproduce 🕹
CodeSandbox reproduction: https://codesandbox.io/s/sparkling-moon-yrppz?file=/src/index.ts
Context 🔦
Your Environment 🌎
The text was updated successfully, but these errors were encountered: