UNPKG

@jonstuebe/react-native-week-selector

Version:
34 lines (33 loc) 1.17 kB
import React, { PureComponent } from 'react'; import { ViewStyle, TextStyle } from 'react-native'; declare type Props = { date?: Date; containerStyle?: ViewStyle; selectorContainerStyle?: ViewStyle; dateContainerStyle?: ViewStyle; textStyle?: TextStyle; whitelistRange?: any; onWeekChanged?: (data: Date) => void; weekStartsOn: number; renderPreviousSelector?: () => React.ReactNode; renderNextSelector?: () => React.ReactNode; dayFormat: string; monthFormat: string; onPreviousPress?: (data: Date) => void; onNextPress?: (data: Date) => void; }; declare type State = { date: Date; }; declare class WeekSelector extends PureComponent<Props, State> { static defaultProps: Props; constructor(props: Props); render(): JSX.Element; renderPreviousSelector: (currentDate: Date, startDate: Date) => JSX.Element | null; renderNextSelector: (currentDate: Date, endDate: Date) => JSX.Element | null; renderDisplayText: (date: Date, weekStartsOn: number) => JSX.Element; onPreviousPress: () => void; onNextPress: () => void; onWeekChanged: () => void; } export default WeekSelector;