You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

styles.js 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. import { Platform } from 'react-native';
  2. import {
  3. BoxModel,
  4. ColorPalette,
  5. createStyleSheet
  6. } from '../../base/styles';
  7. export const ANDROID_UNDERLINE_COLOR = 'transparent';
  8. export const CONTAINER_PADDING = 2 * BoxModel.padding;
  9. export const HEADER_COLOR = ColorPalette.blue;
  10. export const HEADER_PADDING = BoxModel.padding;
  11. const TEXT_SIZE = 17;
  12. /**
  13. * The styles of the React {@code Components} of the feature
  14. * {@code AppSettings}.
  15. */
  16. export default createStyleSheet({
  17. /**
  18. *The platform specific back button style.
  19. */
  20. backIcon: {
  21. alignSelf: 'center',
  22. ...Platform.select({
  23. ios: {
  24. alignSelf: 'center',
  25. fontSize: 30
  26. },
  27. android: {
  28. fontSize: 24,
  29. padding: 8
  30. }
  31. })
  32. },
  33. /**
  34. * Standardized style for a field container {@code View}.
  35. */
  36. fieldContainer: {
  37. alignItems: 'center',
  38. flexDirection: 'row',
  39. minHeight: 65
  40. },
  41. /**
  42. * Standard container for a {@code View} containing a field label.
  43. */
  44. fieldLabelContainer: {
  45. alignItems: 'center',
  46. flexDirection: 'row'
  47. },
  48. /**
  49. * Field container style for all but last row {@code View}.
  50. */
  51. fieldSeparator: {
  52. borderBottomWidth: 1,
  53. borderColor: 'rgba(0, 0, 0, 0.1)'
  54. },
  55. /**
  56. * Style for the {@code View} containing each
  57. * field values (the actual field).
  58. */
  59. fieldValueContainer: {
  60. alignItems: 'center',
  61. flex: 1,
  62. flexDirection: 'row',
  63. justifyContent: 'flex-end'
  64. },
  65. formSectionTitle: {
  66. backgroundColor: 'rgba(0, 0, 0, 0.1)',
  67. marginTop: 5,
  68. padding: 5
  69. },
  70. /**
  71. * Page header {@code View}.
  72. */
  73. headerContainer: {
  74. alignItems: 'center',
  75. backgroundColor: HEADER_COLOR,
  76. flexDirection: 'row',
  77. justifyContent: 'flex-start',
  78. padding: HEADER_PADDING
  79. },
  80. /**
  81. * The title {@code Text} of the header.
  82. */
  83. headerTitle: {
  84. color: ColorPalette.white,
  85. fontSize: 24
  86. },
  87. /**
  88. * Style of the scrollview to be able to scroll the content.
  89. */
  90. scrollView: {
  91. flex: 1
  92. },
  93. /**
  94. * The back button style on the settings screen.
  95. */
  96. settingsBackButton: {
  97. color: ColorPalette.white,
  98. fontSize: 25
  99. },
  100. /**
  101. * The top level container {@code View}.
  102. */
  103. settingsContainer: {
  104. backgroundColor: ColorPalette.white,
  105. flex: 1,
  106. flexDirection: 'column',
  107. margin: 0,
  108. padding: CONTAINER_PADDING,
  109. paddingTop: 0
  110. },
  111. /**
  112. * Global {@code Text} color for the page.
  113. */
  114. text: {
  115. color: ColorPalette.black,
  116. fontSize: TEXT_SIZE
  117. },
  118. /**
  119. * Standard text input field style.
  120. */
  121. textInputField: {
  122. flex: 1,
  123. fontSize: TEXT_SIZE,
  124. textAlign: 'right'
  125. }
  126. });