react-google-calendar
react-google-calendar copied to clipboard
Support Typescript
Is this ilbrary type support for Typescript? How do I do the setup.
Hi! Currently it doesn't support typescript. I am not very familiar with typescript, but I will look into supporting it. If you are more familiar with it/want to do it yourself, you are welcome to make a pull request for it.
Hello, @ericz1803 I added this typing to myself and it's works
react-google-calendar.d.ts
declare module '@ericz1803/react-google-calendar' {
import * as React from 'react';
declare class Calendar extends React.Component<CalendarProps> {}
export interface CalendarProps {
calendars: {
calendarId: string,
color?: string,
}[],
apiKey: string,
showFooter?: boolean,
showArrow?: boolean,
styles?: object,
language?: string
}
export default Calendar;
}
BTW, showFooter
in your Calendar.propTypes
isn't really required