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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. },
  18. /**
  19. * Background of the chat screen.
  20. */
  21. backdrop: {
  22. backgroundColor: ColorPalette.white,
  23. flex: 1
  24. },
  25. chatContainer: {
  26. alignItems: 'stretch',
  27. flex: 1,
  28. flexDirection: 'column'
  29. },
  30. /**
  31. * Wrapper for the details together, such as name, message and time.
  32. */
  33. detailsWrapper: {
  34. alignItems: 'flex-start',
  35. flex: 1,
  36. flexDirection: 'column'
  37. },
  38. /**
  39. * The text node for the display name.
  40. */
  41. displayName: {
  42. color: 'rgb(118, 136, 152)',
  43. fontSize: 13
  44. },
  45. /**
  46. * A special padding to avoid issues on some devices (such as Android devices with custom suggestions bar).
  47. */
  48. extraBarPadding: {
  49. paddingBottom: 30
  50. },
  51. inputBar: {
  52. borderTopColor: 'rgb(209, 219, 231)',
  53. borderTopWidth: 1,
  54. flexDirection: 'row',
  55. paddingHorizontal: BoxModel.padding
  56. },
  57. inputField: {
  58. color: 'rgb(28, 32, 37)',
  59. flex: 1,
  60. height: 48
  61. },
  62. messageContainer: {
  63. flex: 1
  64. },
  65. /**
  66. * The message text itself.
  67. */
  68. messageText: {
  69. color: 'rgb(28, 32, 37)',
  70. fontSize: 15
  71. },
  72. /**
  73. * Wrapper View for the entire block.
  74. */
  75. messageWrapper: {
  76. alignItems: 'flex-start',
  77. flex: 1,
  78. flexDirection: 'row',
  79. marginHorizontal: 17,
  80. marginVertical: 4
  81. },
  82. /**
  83. * Style modifier for the {@code detailsWrapper} for own messages.
  84. */
  85. ownMessageDetailsWrapper: {
  86. alignItems: 'flex-end'
  87. },
  88. /**
  89. * Style modifier for the {@code textWrapper} for own messages.
  90. */
  91. ownTextWrapper: {
  92. backgroundColor: 'rgb(210, 231, 249)',
  93. borderTopLeftRadius: 8,
  94. borderTopRightRadius: 0
  95. },
  96. /**
  97. * Style modifier for system (error) messages.
  98. */
  99. systemTextWrapper: {
  100. backgroundColor: 'rgb(247, 215, 215)'
  101. },
  102. /**
  103. * Wrapper for the name and the message text.
  104. */
  105. textWrapper: {
  106. alignItems: 'flex-start',
  107. backgroundColor: 'rgb(240, 243, 247)',
  108. borderRadius: 8,
  109. borderTopLeftRadius: 0,
  110. flexDirection: 'column',
  111. padding: 9
  112. },
  113. /**
  114. * Text node for the timestamp.
  115. */
  116. timeText: {
  117. color: 'rgb(164, 184, 209)',
  118. fontSize: 13
  119. }
  120. };