@geekyhawks/react-native-ui-components
Version:
A lightweight and reusable React Native UI components library with customizable Text, TextInput, FloatingLabelTextInput, Button, and more. Built with TypeScript, fully typed, and designed for easy integration into any React Native project.
53 lines • 2.19 kB
TypeScript
/**
* ActivityIndicator
*
* A theme-aware wrapper around React Native’s `ActivityIndicator`.
* - Supports theme-based variants for size and color.
* - Allows overriding size and color manually.
* - Variants can be extended or overridden via ThemeProvider.
* - Optionally shows text (e.g. "Loading...") alongside the spinner.
*
* Author: Geeky Hawks FZE LLC
*/
import React from "react";
import { StyleProp, ViewStyle, TextStyle, ColorValue } from "react-native";
import { DefaultActivityIndicatorVariants } from "../../theme";
/**
* Props for custom ActivityIndicator component
*
* - **containerStyle**: optional override styles for the wrapper container.
* - **size**: size of the spinner (`'small'`, `'large'`, or numeric value).
* - **color**: custom spinner color. If omitted, the variant/theme color is used.
* - **variant**: choose from default (`default`, `primary`, `secondary`)
* or a custom variant defined in the `ThemeProvider`.
*/
export interface Props {
/** Override indicator color */
color?: ColorValue;
/** Style for the outer container wrapping the spinner */
containerStyle?: StyleProp<ViewStyle>;
/** Override indicator size */
size?: number | "small" | "large";
/** Optional loading text */
text?: string;
/** Color for loading text */
textColor?: ColorValue;
/** Position of text relative to spinner */
textPosition?: "left" | "right" | "top" | "bottom";
/** Style for text */
textStyle?: StyleProp<TextStyle>;
/** Choose from default or custom variants */
variant?: DefaultActivityIndicatorVariants | (string & {});
}
/**
* ActivityIndicator
*
* - A themed wrapper around React Native’s `ActivityIndicator`.
* - Renders a spinner with optional loading text positioned around it.
* - Supports theme-driven variants for size, color, text color, and container styling.
* - Text color is resolved via theme tokens or overridden via `textColor` prop.
* - Allows full customization with containerStyle, textStyle, size, and color props.
*/
declare const ActivityIndicator: React.FC<Props>;
export default ActivityIndicator;
//# sourceMappingURL=ActivityIndicator.d.ts.map