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