您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

styles.ts 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. import { BoxModel } from '../../../base/styles/components/styles/BoxModel';
  2. import BaseTheme from '../../../base/ui/components/BaseTheme.native';
  3. const BUBBLE_RADIUS = 8;
  4. const recipientContainer = {
  5. alignItems: 'center',
  6. backgroundColor: BaseTheme.palette.support05,
  7. borderRadius: BaseTheme.shape.borderRadius,
  8. flexDirection: 'row',
  9. height: 48,
  10. marginBottom: BaseTheme.spacing[3],
  11. marginHorizontal: BaseTheme.spacing[3],
  12. padding: BaseTheme.spacing[2]
  13. };
  14. /**
  15. * The styles of the feature chat.
  16. *
  17. * NOTE: Sizes and colors come from the 8x8 guidelines. This is the first
  18. * component to receive this treating, if others happen to have similar, we
  19. * need to extract the brand colors and sizes into a branding feature (planned
  20. * for the future).
  21. */
  22. export default {
  23. /**
  24. * Background of the chat screen.
  25. */
  26. backdrop: {
  27. backgroundColor: BaseTheme.palette.ui10,
  28. flex: 1
  29. },
  30. emptyComponentText: {
  31. color: BaseTheme.palette.text03,
  32. textAlign: 'center'
  33. },
  34. lobbyMessageBubble: {
  35. backgroundColor: BaseTheme.palette.support06
  36. },
  37. lobbyMsgNotice: {
  38. color: BaseTheme.palette.text04,
  39. fontSize: 11,
  40. marginTop: 6
  41. },
  42. privateNotice: {
  43. ...BaseTheme.palette.bodyShortRegular,
  44. color: BaseTheme.palette.text02
  45. },
  46. privateMessageBubble: {
  47. backgroundColor: BaseTheme.palette.support05
  48. },
  49. remoteMessageBubble: {
  50. backgroundColor: BaseTheme.palette.ui02,
  51. borderTopLeftRadius: 0
  52. },
  53. replyContainer: {
  54. alignSelf: 'stretch',
  55. justifyContent: 'center'
  56. },
  57. replyStyles: {
  58. iconStyle: {
  59. color: BaseTheme.palette.icon01,
  60. fontSize: 22,
  61. padding: BaseTheme.spacing[2]
  62. },
  63. underlayColor: 'transparent'
  64. },
  65. /**
  66. * Wrapper View for the avatar.
  67. */
  68. avatarWrapper: {
  69. marginRight: BaseTheme.spacing[2],
  70. width: 32
  71. },
  72. chatLink: {
  73. color: BaseTheme.palette.link01
  74. },
  75. chatMessage: {
  76. ...BaseTheme.typography.bodyShortRegular,
  77. color: BaseTheme.palette.text01
  78. },
  79. /**
  80. * Wrapper for the details together, such as name, message and time.
  81. */
  82. detailsWrapper: {
  83. alignItems: 'flex-start',
  84. flex: 1,
  85. flexDirection: 'column'
  86. },
  87. emptyComponentWrapper: {
  88. alignSelf: 'center',
  89. flex: 1,
  90. padding: BoxModel.padding,
  91. paddingTop: '8%',
  92. maxWidth: '80%'
  93. },
  94. /**
  95. * A special padding to avoid issues on some devices (such as Android devices with custom suggestions bar).
  96. */
  97. extraBarPadding: {
  98. paddingBottom: 30
  99. },
  100. inputBar: {
  101. alignItems: 'center',
  102. flexDirection: 'row',
  103. justifyContent: 'space-between',
  104. marginLeft: BaseTheme.spacing[3],
  105. width: '100%'
  106. },
  107. customInputContainer: {
  108. width: '75%'
  109. },
  110. messageBubble: {
  111. alignItems: 'center',
  112. borderRadius: BUBBLE_RADIUS,
  113. flexDirection: 'row'
  114. },
  115. /**
  116. * Wrapper View for the entire block.
  117. */
  118. messageWrapper: {
  119. alignItems: 'flex-start',
  120. flex: 1,
  121. flexDirection: 'row',
  122. marginHorizontal: 17,
  123. marginVertical: 4
  124. },
  125. /**
  126. * Style modifier for the {@code detailsWrapper} for own messages.
  127. */
  128. ownMessageDetailsWrapper: {
  129. alignItems: 'flex-end'
  130. },
  131. replyWrapper: {
  132. alignItems: 'center',
  133. flexDirection: 'row'
  134. },
  135. sendButton: {
  136. marginRight: BaseTheme.spacing[5]
  137. },
  138. /**
  139. * Style modifier for system (error) messages.
  140. */
  141. systemMessageBubble: {
  142. backgroundColor: 'rgb(247, 215, 215)'
  143. },
  144. /**
  145. * Wrapper for the name and the message text.
  146. */
  147. textWrapper: {
  148. alignItems: 'flex-start',
  149. flexDirection: 'column',
  150. padding: 9
  151. },
  152. /**
  153. * Text node for the timestamp.
  154. */
  155. timeText: {
  156. color: BaseTheme.palette.text03,
  157. fontSize: 13
  158. },
  159. chatContainer: {
  160. backgroundColor: BaseTheme.palette.ui01,
  161. flex: 1
  162. },
  163. tabContainer: {
  164. flexDirection: 'row',
  165. justifyContent: 'center'
  166. },
  167. tabLeftButton: {
  168. flex: 1,
  169. borderTopLeftRadius: 0,
  170. borderTopRightRadius: 0,
  171. borderBottomLeftRadius: 0
  172. },
  173. tabRightButton: {
  174. flex: 1,
  175. borderTopLeftRadius: 0,
  176. borderTopRightRadius: 0,
  177. borderBottomRightRadius: 0
  178. },
  179. gifContainer: {
  180. maxHeight: 150
  181. },
  182. gifImage: {
  183. resizeMode: 'contain',
  184. width: 250,
  185. height: undefined,
  186. flexGrow: 1
  187. },
  188. senderDisplayName: {
  189. ...BaseTheme.typography.bodyShortBold,
  190. color: BaseTheme.palette.text02
  191. },
  192. localMessageBubble: {
  193. backgroundColor: BaseTheme.palette.ui04,
  194. borderTopRightRadius: 0
  195. },
  196. lobbyMessageRecipientContainer: {
  197. ...recipientContainer,
  198. backgroundColor: BaseTheme.palette.support06
  199. },
  200. messageRecipientCancelIcon: {
  201. color: BaseTheme.palette.icon01,
  202. fontSize: 18
  203. },
  204. messageRecipientContainer: {
  205. ...recipientContainer
  206. },
  207. messageRecipientText: {
  208. ...BaseTheme.typography.bodyShortRegular,
  209. color: BaseTheme.palette.text01,
  210. flex: 1
  211. }
  212. };