fix: correctly type style override props#2707
Conversation
|
Thank you so much for uploading this PR! I'd like to share a suggestion regarding styling consistency that I've noticed while working with the library. Currently, there are two different approaches for styling calendar components in the original source code:
export default function getStyle(theme: Theme = {}) {
...other things...,
...(theme['stylesheet.calendar.main'] || {})
});
}
export default function styleConstructor(theme: Theme = {}) {
const appStyle = {...defaultStyle, ...theme};
return StyleSheet.create({
...other things...,
...(theme?.stylesheet?.expandable?.main || {})
});
}As a developer using this library, I've found this inconsistency to be a bit confusing when trying to understand which styling approach to use. It would be really helpful if we could have a more consistent styling pattern across all calendar components. Suggestion: Would it be possible to consider standardizing the styling approach (either all stylesheet.~... or all current types) and applying it uniformly? This would make the library much easier to use and maintain for the community. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
@Inbal-Tish any input on this one? or a recommendation for another reviewer? |
|
@SWARVY it would totally make sense to uniformize the styling, you could submit another PR in that sense. However keep in mind that this would be a breaking change and will need an appropriate version bump |
Current typing incorrectly enforces passing styling props as:
although this leads to ignored styling. Correct usage is: