Files
mattermost-mobile/app/components/loading/index.tsx
Elias Nahum 784b05fe97 Upgrade Dependencies (#7299)
* upgrade reanimated

* update devDependencies

* upgrade react-intl

* update react-native and some dependencies

* update react-native-permissions

* update RN

* use Share sheet for Report a problem

* update Sentry

* remove step to downloadWebRTC

* update detox deps

* feedback review
2023-04-21 12:16:54 -04:00

31 lines
818 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {ActivityIndicator, type StyleProp, View, type ViewStyle} from 'react-native';
import {useTheme} from '@context/theme';
type LoadingProps = {
containerStyle?: StyleProp<ViewStyle>;
size?: number | 'small' | 'large';
color?: string;
themeColor?: keyof Theme;
}
const Loading = ({containerStyle, size, color, themeColor}: LoadingProps) => {
const theme = useTheme();
const indicatorColor = themeColor ? theme[themeColor] : color;
return (
<View style={containerStyle}>
<ActivityIndicator
color={indicatorColor}
size={size}
/>
</View>
);
};
export default Loading;