xref: /MusicFree/src/components/base/listLoading.tsx (revision 2dda6be7c2b6b9dbef38419a0bad59210e65d5d5)
121f1ca13S猫头猫import React from 'react';
221f1ca13S猫头猫import {StyleSheet, View} from 'react-native';
321f1ca13S猫头猫import rpx from '@/utils/rpx';
421f1ca13S猫头猫import {ActivityIndicator, useTheme} from 'react-native-paper';
54060c00aS猫头猫import {fontSizeConst} from '@/constants/uiConst';
6*2dda6be7S猫头猫import ThemeText from './themeText';
721f1ca13S猫头猫
84060c00aS猫头猫export default function ListLoading() {
921f1ca13S猫头猫    const {colors} = useTheme();
1021f1ca13S猫头猫
1121f1ca13S猫头猫    return (
1221f1ca13S猫头猫        <View style={style.wrapper}>
134060c00aS猫头猫            <ActivityIndicator
144060c00aS猫头猫                animating
154060c00aS猫头猫                color={colors.text}
164060c00aS猫头猫                size={fontSizeConst.title}
174060c00aS猫头猫            />
18*2dda6be7S猫头猫            <ThemeText style={style.loadingText}>加载中...</ThemeText>
1921f1ca13S猫头猫        </View>
2021f1ca13S猫头猫    );
2121f1ca13S猫头猫}
2221f1ca13S猫头猫
2321f1ca13S猫头猫const style = StyleSheet.create({
2421f1ca13S猫头猫    wrapper: {
2521f1ca13S猫头猫        width: '100%',
26*2dda6be7S猫头猫        height: rpx(420),
2721f1ca13S猫头猫        justifyContent: 'center',
2821f1ca13S猫头猫        alignItems: 'center',
2921f1ca13S猫头猫    },
30*2dda6be7S猫头猫    loadingText: {
31*2dda6be7S猫头猫        marginTop: rpx(100),
32*2dda6be7S猫头猫    },
3321f1ca13S猫头猫});
34