xref: /MusicFree/src/components/base/loading.tsx (revision b882a19d884fffa32f7c8cef31652b909dceaa0f)
1import React from 'react';
2import {StyleSheet, View} from 'react-native';
3import rpx from '@/utils/rpx';
4import {ActivityIndicator, useTheme} from 'react-native-paper';
5import ThemeText from './themeText';
6
7export default function Loading() {
8    const {colors} = useTheme();
9
10    return (
11        <View style={style.wrapper}>
12            <ActivityIndicator animating color={colors.text} />
13            <ThemeText
14                fontSize="title"
15                fontWeight="semibold"
16                style={style.text}>
17                加载中...
18            </ThemeText>
19        </View>
20    );
21}
22
23const style = StyleSheet.create({
24    wrapper: {
25        width: '100%',
26        flex: 1,
27        justifyContent: 'center',
28        alignItems: 'center',
29    },
30    text: {
31        marginTop: rpx(48),
32    },
33});
34