Skip to content

NumberInput - support theme and generify useThemeProps #2370

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

Merged
merged 1 commit into from
Dec 18, 2022

Conversation

M-i-k-e-l
Copy link
Collaborator

Description

NumberInput - support theme and generify useThemeProps
When adding useThemeProps to NumberInput I've noticed that the props are not being used (I had a // @ts-expect-error which was supposedly fixed when it should not have been), so I added generics to useThemeProps; I've fixed some errors and ignored one in asBaseComponent.

Changelog

⚠️ NumberInput - support theme and generify useThemeProps

@@ -47,6 +47,7 @@ export type NumberInputProps = React.PropsWithRef<
};

function NumberInput(props: NumberInputProps, ref: any) {
const themeProps = useThemeProps(props, 'NumberInput');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Didn't you add generics to useThemeProps so you can send it here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did, but it works without it 🪄
Pretty sure that it gets the type from the input props and that's why I got the errors in Picker and Avatar

@M-i-k-e-l M-i-k-e-l requested a review from ethanshar December 14, 2022 09:40
@ethanshar ethanshar merged commit 54f13dc into master Dec 18, 2022
@M-i-k-e-l M-i-k-e-l deleted the feat/number-input-support-theme branch December 19, 2022 10:53
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