@oxyhq/services
Version:
42 lines (41 loc) • 984 B
JavaScript
;
import React from 'react';
import { View, ActivityIndicator, Text, StyleSheet } from 'react-native';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
/**
* Reusable loading state component
* Provides consistent loading indicators across screens
*/
const LoadingState = ({
message,
color,
size = 'large'
}) => {
return /*#__PURE__*/_jsxs(View, {
style: styles.container,
children: [/*#__PURE__*/_jsx(ActivityIndicator, {
size: size,
color: color
}), message && /*#__PURE__*/_jsx(Text, {
style: [styles.message, color ? {
color
} : undefined],
children: message
})]
});
};
const styles = StyleSheet.create({
container: {
alignItems: 'center',
justifyContent: 'center',
padding: 40,
gap: 12
},
message: {
marginTop: 12,
fontSize: 16,
textAlign: 'center'
}
});
export default /*#__PURE__*/React.memo(LoadingState);
//# sourceMappingURL=LoadingState.js.map