react-native-webview.git

WebView.styles.ts 1006B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { StyleSheet, ViewStyle, TextStyle } from 'react-native';
  2. interface Styles {
  3. container: ViewStyle;
  4. errorContainer: ViewStyle;
  5. errorText: TextStyle;
  6. errorTextTitle: TextStyle;
  7. hidden: ViewStyle;
  8. loadingView: ViewStyle;
  9. webView: ViewStyle;
  10. loadingProgressBar: ViewStyle;
  11. }
  12. const BGWASH = 'rgba(255,255,255,0.8)';
  13. const styles = StyleSheet.create<Styles>({
  14. container: {
  15. flex: 1,
  16. },
  17. errorContainer: {
  18. flex: 1,
  19. justifyContent: 'center',
  20. alignItems: 'center',
  21. backgroundColor: BGWASH,
  22. },
  23. hidden: {
  24. height: 0,
  25. flex: 0, // disable 'flex:1' when hiding a View
  26. },
  27. loadingView: {
  28. flex: 1,
  29. justifyContent: 'center',
  30. alignItems: 'center',
  31. },
  32. loadingProgressBar: {
  33. height: 20,
  34. },
  35. errorText: {
  36. fontSize: 14,
  37. textAlign: 'center',
  38. marginBottom: 2,
  39. },
  40. errorTextTitle: {
  41. fontSize: 15,
  42. fontWeight: '500',
  43. marginBottom: 10,
  44. },
  45. webView: {
  46. backgroundColor: '#ffffff',
  47. },
  48. });
  49. export default styles;