InputGroup.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. // @flow
  2. import variable from './../variables/platform';
  3. export default (variables /* : * */ = variable) => {
  4. const inputGroupTheme = {
  5. 'NativeBase.Icon': {
  6. fontSize: 24,
  7. color: variables.sTabBarActiveTextColor,
  8. paddingHorizontal: 5
  9. },
  10. 'NativeBase.IconNB': {
  11. fontSize: 24,
  12. color: variables.sTabBarActiveTextColor,
  13. paddingHorizontal: 5
  14. },
  15. 'NativeBase.Input': {
  16. height: variables.inputHeightBase,
  17. color: variables.inputColor,
  18. paddingLeft: 5,
  19. paddingRight: 5,
  20. flex: 1,
  21. fontSize: variables.inputFontSize,
  22. lineHeight: variables.inputLineHeight
  23. },
  24. '.underline': {
  25. '.success': {
  26. borderColor: variables.inputSuccessBorderColor
  27. },
  28. '.error': {
  29. borderColor: variables.inputErrorBorderColor
  30. },
  31. paddingLeft: 5,
  32. borderWidth: variables.borderWidth,
  33. borderTopWidth: 0,
  34. borderRightWidth: 0,
  35. borderLeftWidth: 0,
  36. borderColor: variables.inputBorderColor
  37. },
  38. '.regular': {
  39. '.success': {
  40. borderColor: variables.inputSuccessBorderColor
  41. },
  42. '.error': {
  43. borderColor: variables.inputErrorBorderColor
  44. },
  45. paddingLeft: 5,
  46. borderWidth: variables.borderWidth,
  47. borderColor: variables.inputBorderColor
  48. },
  49. '.rounded': {
  50. '.success': {
  51. borderColor: variables.inputSuccessBorderColor
  52. },
  53. '.error': {
  54. borderColor: variables.inputErrorBorderColor
  55. },
  56. paddingLeft: 5,
  57. borderWidth: variables.borderWidth,
  58. borderRadius: variables.inputGroupRoundedBorderRadius,
  59. borderColor: variables.inputBorderColor
  60. },
  61. '.success': {
  62. 'NativeBase.Icon': {
  63. color: variables.inputSuccessBorderColor
  64. },
  65. 'NativeBase.IconNB': {
  66. color: variables.inputSuccessBorderColor
  67. },
  68. '.rounded': {
  69. borderRadius: 30,
  70. borderColor: variables.inputSuccessBorderColor
  71. },
  72. '.regular': {
  73. borderColor: variables.inputSuccessBorderColor
  74. },
  75. '.underline': {
  76. borderWidth: variables.borderWidth,
  77. borderTopWidth: 0,
  78. borderRightWidth: 0,
  79. borderLeftWidth: 0,
  80. borderColor: variables.inputSuccessBorderColor
  81. },
  82. borderColor: variables.inputSuccessBorderColor
  83. },
  84. '.error': {
  85. 'NativeBase.Icon': {
  86. color: variables.inputErrorBorderColor
  87. },
  88. 'NativeBase.IconNB': {
  89. color: variables.inputErrorBorderColor
  90. },
  91. '.rounded': {
  92. borderRadius: 30,
  93. borderColor: variables.inputErrorBorderColor
  94. },
  95. '.regular': {
  96. borderColor: variables.inputErrorBorderColor
  97. },
  98. '.underline': {
  99. borderWidth: variables.borderWidth,
  100. borderTopWidth: 0,
  101. borderRightWidth: 0,
  102. borderLeftWidth: 0,
  103. borderColor: variables.inputErrorBorderColor
  104. },
  105. borderColor: variables.inputErrorBorderColor
  106. },
  107. '.disabled': {
  108. 'NativeBase.Icon': {
  109. color: '#384850'
  110. },
  111. 'NativeBase.IconNB': {
  112. color: '#384850'
  113. }
  114. },
  115. paddingLeft: 5,
  116. borderWidth: variables.borderWidth,
  117. borderTopWidth: 0,
  118. borderRightWidth: 0,
  119. borderLeftWidth: 0,
  120. borderColor: variables.inputBorderColor,
  121. backgroundColor: 'transparent',
  122. flexDirection: 'row',
  123. alignItems: 'center'
  124. };
  125. return inputGroupTheme;
  126. };