UNPKG

@geekyhawks/react-native-ui-components

Version:

Lightweight, reusable React Native UI components with built-in theming — including Text, TextInput, FloatingLabelTextInput, Button, and more. Fully typed with TypeScript and easy to integrate into any project.

61 lines 2.5 kB
/** * LoaderModal * * A themed modal component used to indicate loading states. * - Displays a centered spinner and optional text (delegated to ActivityIndicator). * - Supports theme-driven styling via variants. * - Commonly used for blocking UI interactions while data loads. * * Author: Geeky Hawks FZE LLC */ import React from "react"; import { StyleProp, ViewStyle, TextStyle, ColorValue } from "react-native"; import { DefaultLoaderModalVariants } from "../../theme"; /** * Props for LoaderModal component * * - **modalVisible**: controls visibility of the modal. * - **variant**: choose from default (`default`, `light`, `dark`) * or a custom variant defined in the `ThemeProvider`. * - **text**: optional text displayed with the spinner (delegated to ActivityIndicator). * - **textStyle**: override style for text (excluding color). * - **textPosition**: position of text relative to spinner. * - **textColor**: override text color (default: white on dark background). * - **color**: override spinner color (matches ActivityIndicator API). * - **size**: override spinner size (matches ActivityIndicator API). * - **containerStyle**: override outer modal wrapper style. * - **contentStyle**: override inner content wrapper style. */ export interface Props { /** Override spinner color */ color?: ColorValue; /** Override outer container style */ containerStyle?: StyleProp<ViewStyle>; /** Override inner content style */ contentStyle?: StyleProp<ViewStyle>; /** Controls visibility of the modal */ modalVisible: boolean; /** Override spinner size */ size?: number | "small" | "large"; /** Optional text displayed alongside the spinner */ text?: string; /** Override style for the text */ textStyle?: StyleProp<TextStyle>; /** Position of text relative to the spinner */ textPosition?: "left" | "right" | "top" | "bottom"; /** Override text color */ textColor?: ColorValue; /** Choose from default or custom modal variants */ variant?: DefaultLoaderModalVariants | (string & {}); } /** * LoaderModal * * - Renders a modal overlay with a spinner and optional text. * - Delegates spinner + text rendering to ActivityIndicator. * - Uses theme-based variants for container, content, and spinner styling. * - `textColor` is resolved via theme for easy dark/light adaptation. */ declare const LoaderModal: React.FC<Props>; export default LoaderModal; //# sourceMappingURL=LoaderModal.d.ts.map