CardItem.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. import variable from './../variables/platform';
  2. export default (variables = variable) => {
  3. const platform = variables.platform;
  4. const cardItemTheme = {
  5. 'NativeBase.Left': {
  6. 'NativeBase.Body': {
  7. 'NativeBase.Text': {
  8. '.note': {
  9. color: variables.listNoteColor,
  10. fontWeight: '400',
  11. marginRight: 20,
  12. },
  13. },
  14. flex: 1,
  15. marginLeft: 10,
  16. alignItems: null,
  17. },
  18. 'NativeBase.Icon': {
  19. fontSize: variables.iconFontSize,
  20. },
  21. 'NativeBase.IconNB': {
  22. fontSize: variables.iconFontSize,
  23. },
  24. 'NativeBase.Text': {
  25. marginLeft: 10,
  26. alignSelf: 'center',
  27. },
  28. 'NativeBase.Button': {
  29. '.transparent': {
  30. 'NativeBase.Text': {
  31. fontSize: variables.DefaultFontSize - 4,
  32. color: variables.sTabBarActiveTextColor,
  33. },
  34. 'NativeBase.Icon': {
  35. fontSize: variables.iconFontSize - 10,
  36. color: variables.sTabBarActiveTextColor,
  37. marginHorizontal: null,
  38. },
  39. 'NativeBase.IconNB': {
  40. fontSize: variables.iconFontSize - 10,
  41. color: variables.sTabBarActiveTextColor,
  42. },
  43. paddingVertical: null,
  44. paddingHorizontal: null,
  45. paddingRight: variables.listItemPadding + 5,
  46. },
  47. },
  48. flex: 1,
  49. flexDirection: 'row',
  50. alignItems: 'center',
  51. },
  52. '.content': {
  53. 'NativeBase.Text': {
  54. color: platform === 'ios' ? '#555' : '#222',
  55. fontSize: variables.DefaultFontSize - 3,
  56. },
  57. },
  58. '.cardBody': {
  59. padding: -5,
  60. 'NativeBase.Text': {
  61. marginTop: 5,
  62. },
  63. },
  64. 'NativeBase.Body': {
  65. 'NativeBase.Text': {
  66. '.note': {
  67. color: variables.listNoteColor,
  68. fontWeight: '200',
  69. marginRight: 20,
  70. },
  71. },
  72. 'NativeBase.Button': {
  73. '.transparent': {
  74. 'NativeBase.Text': {
  75. fontSize: variables.DefaultFontSize - 4,
  76. color: variables.sTabBarActiveTextColor,
  77. },
  78. 'NativeBase.Icon': {
  79. fontSize: variables.iconFontSize - 10,
  80. color: variables.sTabBarActiveTextColor,
  81. marginHorizontal: null,
  82. },
  83. 'NativeBase.IconNB': {
  84. fontSize: variables.iconFontSize - 10,
  85. color: variables.sTabBarActiveTextColor,
  86. },
  87. paddingVertical: null,
  88. paddingHorizontal: null,
  89. paddingRight: variables.listItemPadding + 5,
  90. alignSelf: 'stretch',
  91. },
  92. },
  93. flex: 1,
  94. alignSelf: 'stretch',
  95. alignItems: 'flex-start',
  96. },
  97. 'NativeBase.Right': {
  98. 'NativeBase.Badge': {
  99. alignSelf: null,
  100. },
  101. 'NativeBase.Button': {
  102. '.transparent': {
  103. 'NativeBase.Text': {
  104. fontSize: variables.DefaultFontSize - 4,
  105. color: variables.sTabBarActiveTextColor,
  106. },
  107. 'NativeBase.Icon': {
  108. fontSize: variables.iconFontSize - 10,
  109. color: variables.sTabBarActiveTextColor,
  110. marginHorizontal: null,
  111. },
  112. 'NativeBase.IconNB': {
  113. fontSize: variables.iconFontSize - 10,
  114. color: variables.sTabBarActiveTextColor,
  115. },
  116. paddingVertical: null,
  117. paddingHorizontal: null,
  118. },
  119. alignSelf: null,
  120. },
  121. 'NativeBase.Icon': {
  122. alignSelf: null,
  123. fontSize: variables.iconFontSize - 8,
  124. color: variables.cardBorderColor,
  125. },
  126. 'NativeBase.IconNB': {
  127. alignSelf: null,
  128. fontSize: variables.iconFontSize - 8,
  129. color: variables.cardBorderColor,
  130. },
  131. 'NativeBase.Text': {
  132. fontSize: variables.DefaultFontSize - 2,
  133. alignSelf: null,
  134. },
  135. 'NativeBase.Thumbnail': {
  136. alignSelf: null,
  137. },
  138. 'NativeBase.Image': {
  139. alignSelf: null,
  140. },
  141. 'NativeBase.Radio': {
  142. alignSelf: null,
  143. },
  144. 'NativeBase.Checkbox': {
  145. alignSelf: null,
  146. },
  147. 'NativeBase.Switch': {
  148. alignSelf: null,
  149. },
  150. flex: 0.8,
  151. },
  152. '.header': {
  153. 'NativeBase.Text': {
  154. fontSize: 16,
  155. fontWeight: platform === 'ios' ? '500' : undefined,
  156. },
  157. '.bordered': {
  158. 'NativeBase.Text': {
  159. color: variables.sTabBarActiveTextColor,
  160. fontWeight: platform === 'ios' ? '500' : undefined,
  161. },
  162. borderBottomWidth: platform === 'ios' ? variables.borderWidth : null,
  163. },
  164. borderBottomWidth: null,
  165. paddingVertical: variables.listItemPadding + 5,
  166. },
  167. '.footer': {
  168. 'NativeBase.Text': {
  169. fontSize: 16,
  170. fontWeight: platform === 'ios' ? '500' : undefined,
  171. },
  172. '.bordered': {
  173. 'NativeBase.Text': {
  174. color: variables.activeTab,
  175. fontWeight: '500',
  176. },
  177. borderTopWidth: platform === 'ios' ? variables.borderWidth : null,
  178. },
  179. borderBottomWidth: null,
  180. },
  181. 'NativeBase.Text': {
  182. '.note': {
  183. color: variables.listNoteColor,
  184. fontWeight: '200',
  185. },
  186. },
  187. 'NativeBase.Icon': {
  188. width: variables.iconFontSize + 5,
  189. fontSize: variables.iconFontSize - 2,
  190. },
  191. 'NativeBase.IconNB': {
  192. width: variables.iconFontSize + 5,
  193. fontSize: variables.iconFontSize - 2,
  194. },
  195. '.bordered': {
  196. borderBottomWidth: variables.borderWidth,
  197. borderColor: variables.cardBorderColor,
  198. },
  199. flexDirection: 'row',
  200. alignItems: 'center',
  201. borderRadius: 2,
  202. padding: variables.listItemPadding + 5,
  203. paddingVertical: variables.listItemPadding,
  204. backgroundColor: variables.cardDefaultBg,
  205. };
  206. return cardItemTheme;
  207. };