michangarrito/apps/backend/node_modules/react-native/Libraries/Utilities/DevLoadingView.js
rckrdmrd 48dea7a5d0 feat: Initial commit - michangarrito
Marketplace móvil para negocios locales mexicanos.

Estructura inicial:
- apps/backend (NestJS API)
- apps/frontend (React Web)
- apps/mobile (Expo/React Native)
- apps/mcp-server (Claude MCP Server)
- apps/whatsapp-service (WhatsApp Business API)
- database/ (PostgreSQL DDL)
- docs/ (Documentación)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 04:41:02 -06:00

73 lines
1.7 KiB
JavaScript

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
import processColor from '../StyleSheet/processColor';
import {getColorScheme} from './Appearance';
import NativeDevLoadingView from './NativeDevLoadingView';
const COLOR_SCHEME = {
dark: {
load: {
backgroundColor: '#fafafa',
textColor: '#242526',
},
refresh: {
backgroundColor: '#2584e8',
textColor: '#ffffff',
},
error: {
backgroundColor: '#1065AF',
textColor: '#ffffff',
},
},
default: {
load: {
backgroundColor: '#404040',
textColor: '#ffffff',
},
refresh: {
backgroundColor: '#2584e8',
textColor: '#ffffff',
},
error: {
backgroundColor: '#1065AF',
textColor: '#ffffff',
},
},
};
export default {
showMessage(message: string, type: 'load' | 'refresh' | 'error') {
if (NativeDevLoadingView) {
const colorScheme =
getColorScheme() === 'dark' ? COLOR_SCHEME.dark : COLOR_SCHEME.default;
const colorSet = colorScheme[type];
let backgroundColor;
let textColor;
if (colorSet) {
backgroundColor = processColor(colorSet.backgroundColor);
textColor = processColor(colorSet.textColor);
}
NativeDevLoadingView.showMessage(
message,
typeof textColor === 'number' ? textColor : null,
typeof backgroundColor === 'number' ? backgroundColor : null,
);
}
},
hide() {
NativeDevLoadingView && NativeDevLoadingView.hide();
},
};