gpbl / react-day-picker

DayPicker is a customizable date picker component for React. Add date pickers, calendars, and date inputs to your web applications.
https://daypicker.dev
MIT License
5.88k stars 702 forks source link

fix(types): replace deprecated React.SFC type #2049

Closed sabotatore closed 2 months ago

sabotatore commented 5 months ago

Description

Replaces deprecated React.SFC type with React.FunctionComponent.

It's required to passing @types/react 18 linter check:

node_modules/react-day-picker/types/Props.d.ts:47:13 - error TS2694: Namespace 'React' has no exported member 'SFC'.

47     | React.SFC<CaptionElementProps>;

Type of Change

Checklist

Before submitting your pull request, please make sure the following is done:

Linked Issues

If this PR addresses any existing issues, please link them here. Example: Fixes #123

Test Plan

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Screenshots (if appropriate)

Include screenshots or GIFs if relevant. This is especially important for UI-related changes.

Further Comments

If you have any additional comments or questions, please add them here.

gpbl commented 2 months ago

Thanks @sabotatore for your contribution!