pager-view
Version:
A wrapper that works on multiple platforms: Android, iOS, and Web
36 lines (27 loc) • 847 B
text/typescript
import type { ForwardedRef, ReactElement, RefObject } from "react";
import type { Animated, StyleProp, View, ViewStyle } from "react-native";
type ScrollInstanceRef = ForwardedRef<Animated.FlatList>;
type ColorProps =
| `var(--${string})`
| `#${string}`
| `rgb(${string})`
| `rgba(${string})`
| `hsl(${string})`
| `hwb(${string})`
| `lch(${string})`
| `oklch(${string})`
| `lab(${string})`
| `oklab(${string})`
| `color(${string})`;
type GetRefProps = (ref: ScrollInstanceRef, width: number) => void;
type ScreenProps = {
id: number;
element: ReactElement;
};
type ScrollRef = {
ref: ScrollInstanceRef;
width: number;
};
type StyleProps<T = ViewStyle> = StyleProp<T>;
type TabProps = { id: number; ref: RefObject<View>; title: string };
export type { ColorProps, GetRefProps, ScreenProps, ScrollRef, StyleProps, TabProps };