選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

styles.ts 5.4KB

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