UNPKG

@tra-tech/react-native-kitra

Version:
36 lines 1.07 kB
import { StyleSheet, View, ActivityIndicator as RNActivityIndicator } from 'react-native'; import { opacity } from '../../utilities'; import { applyDefaults } from '../../core/KitraProvider'; const styles = StyleSheet.create({ centeredView: { zIndex: 100, flex: 1, width: '100%', height: '100%', alignItems: 'center', justifyContent: 'center' }, modalView: { borderRadius: 20, width: 150, height: 150 } }); const ActivityIndicator = _ref => { let { theme, children } = _ref; return /*#__PURE__*/React.createElement(View, { style: [styles.centeredView, { backgroundColor: opacity(String(theme === null || theme === void 0 ? void 0 : theme.lightBlack), 80) }] }, /*#__PURE__*/React.createElement(View, { style: [styles.modalView] }, children || /*#__PURE__*/React.createElement(RNActivityIndicator, { size: "large", color: theme === null || theme === void 0 ? void 0 : theme.primary }))); }; export default applyDefaults(ActivityIndicator); //# sourceMappingURL=ActivityIndicator.js.map