Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

styles.ts 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. import ColorSchemeRegistry from '../../../base/color-scheme/ColorSchemeRegistry';
  2. import { schemeColor } from '../../../base/color-scheme/functions';
  3. import BaseTheme from '../../../base/ui/components/BaseTheme.native';
  4. const BUTTON_SIZE = 48;
  5. // Toolbox, toolbar:
  6. /**
  7. * The style of toolbar buttons.
  8. */
  9. const toolbarButton = {
  10. borderRadius: BaseTheme.shape.borderRadius,
  11. borderWidth: 0,
  12. flex: 0,
  13. flexDirection: 'row',
  14. height: BUTTON_SIZE,
  15. justifyContent: 'center',
  16. marginHorizontal: 6,
  17. marginVertical: 6,
  18. width: BUTTON_SIZE
  19. };
  20. /**
  21. * The icon style of the toolbar buttons.
  22. */
  23. const toolbarButtonIcon = {
  24. alignSelf: 'center',
  25. color: BaseTheme.palette.icon04,
  26. fontSize: 24
  27. };
  28. /**
  29. * The icon style of toolbar buttons which display white icons.
  30. */
  31. const whiteToolbarButtonIcon = {
  32. ...toolbarButtonIcon,
  33. color: BaseTheme.palette.icon01
  34. };
  35. /**
  36. * The style of reaction buttons.
  37. */
  38. const reactionButton = {
  39. ...toolbarButton,
  40. backgroundColor: 'transparent',
  41. alignItems: 'center',
  42. marginTop: 0,
  43. marginHorizontal: 0
  44. };
  45. const gifButton = {
  46. ...reactionButton,
  47. backgroundColor: '#000'
  48. };
  49. /**
  50. * The style of the emoji on the reaction buttons.
  51. */
  52. const reactionEmoji = {
  53. fontSize: 20,
  54. color: BaseTheme.palette.icon01
  55. };
  56. const reactionMenu = {
  57. flexDirection: 'column',
  58. justifyContent: 'center',
  59. alignItems: 'center',
  60. backgroundColor: BaseTheme.palette.ui01
  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. marginHorizontal: 'auto',
  89. marginVertical: BaseTheme.spacing[0],
  90. paddingHorizontal: BaseTheme.spacing[2],
  91. width: '100%'
  92. },
  93. toolboxButtonIconContainer: {
  94. alignItems: 'center',
  95. borderRadius: BaseTheme.shape.borderRadius,
  96. height: BaseTheme.spacing[7],
  97. justifyContent: 'center',
  98. width: BaseTheme.spacing[7]
  99. }
  100. };
  101. export default styles;
  102. /**
  103. * Color schemed styles for the @{Toolbox} component.
  104. */
  105. ColorSchemeRegistry.register('Toolbox', {
  106. /**
  107. * Styles for buttons in the toolbar.
  108. */
  109. buttonStyles: {
  110. iconStyle: toolbarButtonIcon,
  111. style: toolbarButton
  112. },
  113. buttonStylesBorderless: {
  114. iconStyle: whiteToolbarButtonIcon,
  115. style: {
  116. ...toolbarButton,
  117. backgroundColor: 'transparent'
  118. },
  119. underlayColor: 'transparent'
  120. },
  121. backgroundToggle: {
  122. backgroundColor: BaseTheme.palette.ui04
  123. },
  124. hangupMenuContainer: {
  125. marginHorizontal: BaseTheme.spacing[2],
  126. marginVertical: BaseTheme.spacing[2]
  127. },
  128. hangupButton: {
  129. flex: 1,
  130. marginHorizontal: BaseTheme.spacing[2],
  131. marginVertical: BaseTheme.spacing[2]
  132. },
  133. hangupButtonStyles: {
  134. iconStyle: whiteToolbarButtonIcon,
  135. style: {
  136. ...toolbarButton,
  137. backgroundColor: schemeColor('hangup')
  138. },
  139. underlayColor: BaseTheme.palette.ui04
  140. },
  141. reactionDialog: {
  142. position: 'absolute',
  143. width: '100%',
  144. height: '100%',
  145. backgroundColor: 'transparent'
  146. },
  147. overflowReactionMenu: {
  148. ...reactionMenu,
  149. padding: BaseTheme.spacing[3]
  150. },
  151. reactionMenu: {
  152. ...reactionMenu,
  153. paddingHorizontal: BaseTheme.spacing[3],
  154. borderRadius: 3,
  155. width: 360
  156. },
  157. reactionRow: {
  158. alignItems: 'center',
  159. flexDirection: 'row',
  160. justifyContent: 'space-between'
  161. },
  162. reactionButton: {
  163. gifButton,
  164. style: reactionButton,
  165. underlayColor: BaseTheme.palette.ui04,
  166. emoji: reactionEmoji
  167. },
  168. emojiAnimation: {
  169. color: BaseTheme.palette.icon01,
  170. position: 'absolute',
  171. zIndex: 1001,
  172. elevation: 2,
  173. fontSize: 20,
  174. left: '50%',
  175. top: '100%'
  176. },
  177. /**
  178. * Styles for toggled buttons in the toolbar.
  179. */
  180. toggledButtonStyles: {
  181. iconStyle: whiteToolbarButtonIcon,
  182. style: {
  183. ...toolbarButton
  184. },
  185. underlayColor: 'transparent'
  186. }
  187. });