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 3.7KB

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