import React from 'react'; import {ActivityIndicator, StyleSheet, View} from 'react-native'; import rpx from '@/utils/rpx'; import ThemeText from './themeText'; import useColors from '@/hooks/useColors'; interface ILoadingProps { text?: string; showText?: boolean; height?: number; color?: string; } export default function Loading(props: ILoadingProps) { const colors = useColors(); const {showText = true, height, text, color} = props; return ( {showText ? ( {text ?? '加载中...'} ) : null} ); } const style = StyleSheet.create({ wrapper: { width: '100%', flex: 1, justifyContent: 'center', alignItems: 'center', }, text: { marginTop: rpx(48), }, });