Application Android et IOS pour l'amicale des élèves https://play.google.com/store/apps/details?id=fr.amicaleinsat.application
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

CardItem.js 4.9KB

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