fix: type issue in classNames prop #997
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
The className property as an object was optional but when the className is provided it was required to provide all the properties declared or needed in className.
From chatGPT the more explanation
The ? here means that classNames itself is optional. You can choose to provide or omit this property.
Each property inside the classNames object is required if the classNames object is provided. You must include all these properties with corresponding string values if you use the classNames object.
Solution : make each property optional
The ? after classNames means that the classNames property itself is optional. When using this type, you might not provide the classNames property at all.
tags?: string and others: Each property inside the classNames object is also optional. This means that you can provide an object with some, all, or none of these properties.
This fixes #983