react-native-multiswitch-controller
Version:
Smooth animated multiswitch component with dynamic width
18 lines • 822 B
TypeScript
import { type LayoutChangeEvent, type TextStyle, type ViewStyle } from 'react-native';
import { type SharedValue } from 'react-native-reanimated';
import type { ControllerVariant, ControlOption } from './types';
declare function SwitchItem<TValue>(props: {
item: ControlOption<TValue>;
isActive: boolean;
index: number;
onLayout: (event: LayoutChangeEvent, index: number) => void;
onChange: (value: TValue) => void;
variant: ControllerVariant;
inactiveTextStyle?: TextStyle;
activeTextStyle?: TextStyle;
itemContainerStyle?: ViewStyle;
animatedActiveOptionIndex?: SharedValue<number | null>;
}): import("react/jsx-runtime").JSX.Element;
declare const _default: import("react").MemoExoticComponent<typeof SwitchItem>;
export default _default;
//# sourceMappingURL=SwitchItem.d.ts.map