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 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
  2. import BaseTheme from '../../../base/ui/components/BaseTheme.native';
  3. const BUTTON_SIZE = 48;
  4. // Toolbox, toolbar:
  5. /**
  6. * The style of toolbar buttons.
  7. */
  8. const toolbarButton = {
  9. borderRadius: BaseTheme.shape.borderRadius,
  10. borderWidth: 0,
  11. flex: 0,
  12. flexDirection: 'row',
  13. height: BUTTON_SIZE,
  14. justifyContent: 'center',
  15. marginHorizontal: 6,
  16. marginVertical: 6,
  17. width: BUTTON_SIZE
  18. };
  19. /**
  20. * The icon style of the toolbar buttons.
  21. */
  22. const toolbarButtonIcon = {
  23. alignSelf: 'center',
  24. color: BaseTheme.palette.icon04,
  25. fontSize: 24
  26. };
  27. /**
  28. * The icon style of toolbar buttons which display white icons.
  29. */
  30. const whiteToolbarButtonIcon = {
  31. ...toolbarButtonIcon,
  32. color: BaseTheme.palette.icon01
  33. };
  34. /**
  35. * The style of reaction buttons.
  36. */
  37. const reactionButton = {
  38. ...toolbarButton,
  39. backgroundColor: 'transparent',
  40. alignItems: 'center',
  41. marginTop: 0,
  42. marginHorizontal: 0
  43. };
  44. const gifButton = {
  45. ...reactionButton,
  46. backgroundColor: '#000'
  47. };
  48. /**
  49. * The style of the emoji on the reaction buttons.
  50. */
  51. const reactionEmoji = {
  52. fontSize: 20,
  53. color: BaseTheme.palette.icon01
  54. };
  55. const reactionMenu = {
  56. flexDirection: 'column',
  57. justifyContent: 'center',
  58. alignItems: 'center',
  59. backgroundColor: BaseTheme.palette.bottomSheet,
  60. padding: BaseTheme.spacing[3]
  61. };
  62. /**
  63. * The Toolbox and toolbar related styles.
  64. */
  65. const styles = {
  66. sheetGestureRecognizer: {
  67. alignItems: 'stretch',
  68. flexDirection: 'column'
  69. },
  70. /**
  71. * The style of the toolbar.
  72. */
  73. toolbox: {
  74. alignItems: 'center',
  75. backgroundColor: BaseTheme.palette.uiBackground,
  76. borderTopLeftRadius: 3,
  77. borderTopRightRadius: 3,
  78. flexDirection: 'row',
  79. justifyContent: 'space-between'
  80. },
  81. /**
  82. * The style of the root/top-level container of {@link Toolbox}.
  83. */
  84. toolboxContainer: {
  85. backgroundColor: BaseTheme.palette.uiBackground,
  86. flexDirection: 'column',
  87. maxWidth: 580,
  88. marginLeft: 'auto',
  89. marginRight: 'auto',
  90. width: '100%'
  91. }
  92. };
  93. export default styles;
  94. /**
  95. * Color schemed styles for the @{Toolbox} component.
  96. */
  97. ColorSchemeRegistry.register('Toolbox', {
  98. /**
  99. * Styles for buttons in the toolbar.
  100. */
  101. buttonStyles: {
  102. iconStyle: toolbarButtonIcon,
  103. style: toolbarButton
  104. },
  105. buttonStylesBorderless: {
  106. iconStyle: whiteToolbarButtonIcon,
  107. style: {
  108. ...toolbarButton,
  109. backgroundColor: 'transparent'
  110. },
  111. underlayColor: 'transparent'
  112. },
  113. backgroundToggle: {
  114. backgroundColor: BaseTheme.palette.ui13
  115. },
  116. hangupMenuContainer: {
  117. marginHorizontal: BaseTheme.spacing[2],
  118. marginVertical: BaseTheme.spacing[2]
  119. },
  120. hangupButton: {
  121. flex: 1,
  122. marginHorizontal: BaseTheme.spacing[2],
  123. marginVertical: BaseTheme.spacing[2]
  124. },
  125. hangupButtonStyles: {
  126. iconStyle: whiteToolbarButtonIcon,
  127. style: {
  128. ...toolbarButton,
  129. backgroundColor: schemeColor('hangup')
  130. },
  131. underlayColor: BaseTheme.palette.underlay01
  132. },
  133. reactionDialog: {
  134. position: 'absolute',
  135. width: '100%',
  136. height: '100%',
  137. backgroundColor: 'transparent'
  138. },
  139. overflowReactionMenu: reactionMenu,
  140. reactionMenu: {
  141. ...reactionMenu,
  142. borderRadius: 3,
  143. width: 360
  144. },
  145. reactionRow: {
  146. flexDirection: 'row',
  147. justifyContent: 'space-between',
  148. alignItems: 'center',
  149. width: '100%'
  150. },
  151. reactionButton: {
  152. gifButton,
  153. style: reactionButton,
  154. underlayColor: BaseTheme.palette.ui13,
  155. emoji: reactionEmoji
  156. },
  157. emojiAnimation: {
  158. color: BaseTheme.palette.icon01,
  159. position: 'absolute',
  160. zIndex: 1001,
  161. elevation: 2,
  162. fontSize: 20,
  163. left: '50%',
  164. top: '100%'
  165. },
  166. /**
  167. * Styles for toggled buttons in the toolbar.
  168. */
  169. toggledButtonStyles: {
  170. iconStyle: whiteToolbarButtonIcon,
  171. style: {
  172. ...toolbarButton
  173. },
  174. underlayColor: 'transparent'
  175. }
  176. });