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

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