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

Invlaid types for Custom Component (MyComponentStylesNames) #3281

Closed
maazakn opened this issue Jan 4, 2023 · 2 comments
Closed

Invlaid types for Custom Component (MyComponentStylesNames) #3281

maazakn opened this issue Jan 4, 2023 · 2 comments

Comments

@maazakn
Copy link
Contributor

maazakn commented Jan 4, 2023

Link to the page where something nasty is located

https://mantine.dev/guides/custom-components/

Exact quote of what is wrong

MyComponent.styles.ts

import { createStyles, MantineNumberSize } from '@mantine/core';

// Styles params are optional
export interface MyComponentStylesParams {
  radius: MantineNumberSize;
}

MyComponent.tsx

interface MyComponentProps extends DefaultProps<MyComponentStylesNames, MyComponentStylesParams> {
  radius?: MantineNumberSize;
}

There is a type mismatch in the radius type ( syles.ts file) where it is marked as required while in MyComponent.tsx it is Optional

Are you willing to create pull request with the fix?

Yes

@rtivital
Copy link
Member

rtivital commented Jan 4, 2023

You are welcome to create a PR with a fix

@maazakn
Copy link
Contributor Author

maazakn commented Jan 4, 2023 via email

maazakn added a commit to maazakn/mantine that referenced this issue Jan 5, 2023
rtivital pushed a commit that referenced this issue Jan 5, 2023
@rtivital rtivital closed this as completed Jan 5, 2023
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

No branches or pull requests

2 participants