mirror of
https://github.com/DocNR/POWR.git
synced 2025-04-23 01:01:27 +00:00
20 lines
469 B
TypeScript
20 lines
469 B
TypeScript
// 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;
|
|
} |