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.9KB

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