react-native-webview.git

WebView.styles.ts 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 styles = StyleSheet.create<Styles>({
  13. container: {
  14. flex: 1,
  15. overflow: 'hidden',
  16. backgroundColor: 'white',
  17. },
  18. errorContainer: {
  19. flex: 1,
  20. justifyContent: 'center',
  21. alignItems: 'center',
  22. backgroundColor: 'white',
  23. },
  24. hidden: {
  25. height: 0,
  26. flex: 0, // disable 'flex:1' when hiding a View
  27. },
  28. loadingView: {
  29. flex: 1,
  30. justifyContent: 'center',
  31. alignItems: 'center',
  32. backgroundColor: 'white',
  33. },
  34. loadingProgressBar: {
  35. height: 20,
  36. },
  37. errorText: {
  38. fontSize: 14,
  39. textAlign: 'center',
  40. marginBottom: 2,
  41. },
  42. errorTextTitle: {
  43. fontSize: 15,
  44. fontWeight: '500',
  45. marginBottom: 10,
  46. },
  47. webView: {
  48. backgroundColor: '#ffffff',
  49. },
  50. });
  51. export default styles;