BugiDev / react-native-calendar-strip

Easy to use and visually stunning calendar component for React Native.
MIT License
936 stars 325 forks source link

fix missing TS props #253

Closed matthewwo closed 3 years ago

matthewwo commented 3 years ago

Addressing #252, sorry as I'm fairly new to TS, please correct me if I'm not using the props / defining it correctly. 😄

peacechen commented 3 years ago

Thanks @prankymat for this fix. A couple notes:

headerText is set internally with a default if not provided. Adding it to defaultProps prevents localizations from occurring properly: https://github.com/BugiDev/react-native-calendar-strip/blob/f659b96845888f480a06e200c33827ac39109507/src/CalendarHeader.js#L82

The ref prop is internal to React and should not be added to the props list in CalendarStrip.js. I've never seen a project include that in its props list. It should be fine adding it to the TS definition.

matthewwo commented 3 years ago

thanks for the comments! i'll remove the changes from the js file.

peacechen commented 3 years ago

Thanks @prankymat This will be included in the next release