POWR/components/pager/types.ts

20 lines
469 B
TypeScript
Raw Normal View History

2025-02-09 20:38:38 -05:00
// components/pager/types.ts
import { StyleProp, ViewStyle } from 'react-native';
export interface PageSelectedEvent {
nativeEvent: {
position: number;
};
}
export interface PagerProps {
children: React.ReactNode[];
style?: StyleProp<ViewStyle>;
initialPage?: number;
onPageSelected?: (e: PageSelectedEvent) => void;
}
export interface PagerRef {
setPage: (page: number) => void;
scrollTo?: (options: { x: number; animated?: boolean }) => void;
}