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