react-native-modern-elements
Version:
A modern, customizable UI component library for React Native
36 lines (35 loc) • 1.08 kB
TypeScript
import React, { ReactNode } from "react";
import { StyleProp, TextStyle, ViewStyle } from "react-native";
export interface TabItemType {
label: string;
icon?: ReactNode;
tooltip?: string | number;
disabled?: boolean;
}
export interface TabSliderProps {
tabs: TabItemType[];
children: ReactNode[];
initialPage?: number;
activeColor?: string;
inactiveColor?: string;
variant?: "pill" | "underline" | "chip";
tooltipActiveColor?: string;
tooltipInactiveColor?: string;
/** NEW */
alignTabs?: "left" | "center" | "right";
/** NEW - Custom design */
buttonTextStyle?: StyleProp<TextStyle>;
buttonContainerStyle?: StyleProp<ViewStyle>;
/** ✅ ADD THIS */
buttonStyle?: StyleProp<ViewStyle>;
/** NEW - Fully custom render */
renderTabItem?: (params: {
tab: TabItemType;
isActive: boolean;
onPress: () => void;
}) => ReactNode;
header?: ReactNode;
footer?: ReactNode;
}
declare const _default: React.NamedExoticComponent<TabSliderProps>;
export default _default;