Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

styles.js 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. // @flow
  2. import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
  3. import { BoxModel, ColorPalette } from '../../../base/styles';
  4. const BUBBLE_RADIUS = 8;
  5. /**
  6. * The styles of the feature chat.
  7. *
  8. * NOTE: Sizes and colors come from the 8x8 guidelines. This is the first
  9. * component to receive this treating, if others happen to have similar, we
  10. * need to extract the brand colors and sizes into a branding feature (planned
  11. * for the future).
  12. */
  13. export default {
  14. /**
  15. * Wrapper View for the avatar.
  16. */
  17. avatarWrapper: {
  18. marginRight: 8,
  19. width: 32
  20. },
  21. chatContainer: {
  22. alignItems: 'stretch',
  23. flex: 1,
  24. flexDirection: 'column'
  25. },
  26. chatLink: {
  27. color: ColorPalette.blue
  28. },
  29. /**
  30. * Wrapper for the details together, such as name, message and time.
  31. */
  32. detailsWrapper: {
  33. alignItems: 'flex-start',
  34. flex: 1,
  35. flexDirection: 'column'
  36. },
  37. /**
  38. * A special padding to avoid issues on some devices (such as Android devices with custom suggestions bar).
  39. */
  40. extraBarPadding: {
  41. paddingBottom: 30
  42. },
  43. inputBar: {
  44. alignItems: 'center',
  45. borderTopColor: 'rgb(209, 219, 231)',
  46. borderTopWidth: 1,
  47. flexDirection: 'row',
  48. paddingHorizontal: BoxModel.padding
  49. },
  50. inputField: {
  51. color: 'rgb(28, 32, 37)',
  52. flex: 1,
  53. height: 48
  54. },
  55. messageBubble: {
  56. alignItems: 'center',
  57. borderRadius: BUBBLE_RADIUS,
  58. flexDirection: 'row'
  59. },
  60. messageContainer: {
  61. flex: 1
  62. },
  63. /**
  64. * Wrapper View for the entire block.
  65. */
  66. messageWrapper: {
  67. alignItems: 'flex-start',
  68. flex: 1,
  69. flexDirection: 'row',
  70. marginHorizontal: 17,
  71. marginVertical: 4
  72. },
  73. /**
  74. * Style modifier for the {@code detailsWrapper} for own messages.
  75. */
  76. ownMessageDetailsWrapper: {
  77. alignItems: 'flex-end'
  78. },
  79. replyWrapper: {
  80. alignItems: 'center',
  81. flexDirection: 'row'
  82. },
  83. sendButtonIcon: {
  84. color: ColorPalette.darkGrey,
  85. fontSize: 22
  86. },
  87. /**
  88. * Style modifier for system (error) messages.
  89. */
  90. systemMessageBubble: {
  91. backgroundColor: 'rgb(247, 215, 215)'
  92. },
  93. /**
  94. * Wrapper for the name and the message text.
  95. */
  96. textWrapper: {
  97. alignItems: 'flex-start',
  98. flexDirection: 'column',
  99. padding: 9
  100. },
  101. /**
  102. * Text node for the timestamp.
  103. */
  104. timeText: {
  105. color: 'rgb(164, 184, 209)',
  106. fontSize: 13
  107. }
  108. };
  109. ColorSchemeRegistry.register('Chat', {
  110. /**
  111. * Background of the chat screen.
  112. */
  113. backdrop: {
  114. backgroundColor: schemeColor('background'),
  115. flex: 1
  116. },
  117. /**
  118. * The text node for the display name.
  119. */
  120. displayName: {
  121. color: schemeColor('displayName'),
  122. fontSize: 13
  123. },
  124. localMessageBubble: {
  125. backgroundColor: schemeColor('localMsgBackground'),
  126. borderTopRightRadius: 0
  127. },
  128. messageRecipientCancelIcon: {
  129. color: schemeColor('icon'),
  130. fontSize: 18
  131. },
  132. messageRecipientContainer: {
  133. alignItems: 'center',
  134. backgroundColor: schemeColor('privateMsgBackground'),
  135. flexDirection: 'row',
  136. padding: BoxModel.padding
  137. },
  138. messageRecipientText: {
  139. color: schemeColor('text'),
  140. flex: 1
  141. },
  142. privateNotice: {
  143. color: schemeColor('privateMsgNotice'),
  144. fontSize: 11,
  145. marginTop: 6
  146. },
  147. privateMessageBubble: {
  148. backgroundColor: schemeColor('privateMsgBackground')
  149. },
  150. remoteMessageBubble: {
  151. backgroundColor: schemeColor('remoteMsgBackground'),
  152. borderTopLeftRadius: 0
  153. },
  154. replyContainer: {
  155. alignSelf: 'stretch',
  156. borderLeftColor: schemeColor('replyBorder'),
  157. borderLeftWidth: 1,
  158. justifyContent: 'center'
  159. },
  160. replyStyles: {
  161. iconStyle: {
  162. color: schemeColor('replyIcon'),
  163. fontSize: 22,
  164. padding: 8
  165. }
  166. }
  167. });