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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. flex: 1,
  59. height: 48
  60. },
  61. messageContainer: {
  62. flex: 1
  63. },
  64. /**
  65. * The message text itself.
  66. */
  67. messageText: {
  68. color: 'rgb(28, 32, 37)',
  69. fontSize: 15
  70. },
  71. /**
  72. * Wrapper View for the entire block.
  73. */
  74. messageWrapper: {
  75. alignItems: 'flex-start',
  76. flex: 1,
  77. flexDirection: 'row',
  78. marginHorizontal: 17,
  79. marginVertical: 4
  80. },
  81. /**
  82. * Style modifier for the {@code detailsWrapper} for own messages.
  83. */
  84. ownMessageDetailsWrapper: {
  85. alignItems: 'flex-end'
  86. },
  87. /**
  88. * Style modifier for the {@code textWrapper} for own messages.
  89. */
  90. ownTextWrapper: {
  91. backgroundColor: 'rgb(210, 231, 249)',
  92. borderTopLeftRadius: 8,
  93. borderTopRightRadius: 0
  94. },
  95. /**
  96. * Style modifier for system (error) messages.
  97. */
  98. systemTextWrapper: {
  99. backgroundColor: 'rgb(247, 215, 215)'
  100. },
  101. /**
  102. * Wrapper for the name and the message text.
  103. */
  104. textWrapper: {
  105. alignItems: 'flex-start',
  106. backgroundColor: 'rgb(240, 243, 247)',
  107. borderRadius: 8,
  108. borderTopLeftRadius: 0,
  109. flexDirection: 'column',
  110. padding: 9
  111. },
  112. /**
  113. * Text node for the timestamp.
  114. */
  115. timeText: {
  116. color: 'rgb(164, 184, 209)',
  117. fontSize: 13
  118. }
  119. };