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.js 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. // @flow
  2. import { BoxModel, ColorPalette, createStyleSheet } from '../../../base/styles';
  3. import { HANGUP_BUTTON_SIZE } from '../../constants';
  4. // Toolbox, toolbar:
  5. /**
  6. * The style of toolbar buttons.
  7. */
  8. const toolbarButton = {
  9. backgroundColor: ColorPalette.white,
  10. borderRadius: 20,
  11. borderWidth: 0,
  12. flex: 0,
  13. flexDirection: 'row',
  14. height: 40,
  15. justifyContent: 'center',
  16. // XXX We probably tested BoxModel.margin and discovered it to be too small
  17. // for our taste.
  18. marginHorizontal: 7,
  19. opacity: 0.7,
  20. width: 40
  21. };
  22. /**
  23. * The icon style of the toolbar buttons.
  24. */
  25. const toolbarButtonIcon = {
  26. alignSelf: 'center',
  27. color: ColorPalette.darkGrey,
  28. fontSize: 22
  29. };
  30. /**
  31. * The Toolbox and toolbar related styles.
  32. */
  33. const styles = createStyleSheet({
  34. /**
  35. * The style of the toolbar button which hangs the current conference up.
  36. */
  37. hangupButton: {
  38. ...toolbarButton,
  39. backgroundColor: ColorPalette.red,
  40. borderRadius: 30,
  41. height: HANGUP_BUTTON_SIZE,
  42. width: HANGUP_BUTTON_SIZE
  43. },
  44. /**
  45. * The icon style of toolbar buttons which hangs the current conference up.
  46. */
  47. hangupButtonIcon: {
  48. ...toolbarButtonIcon,
  49. color: ColorPalette.white,
  50. fontSize: 24
  51. },
  52. /**
  53. * The style of the toolbar.
  54. */
  55. toolbar: {
  56. alignItems: 'center',
  57. flexDirection: 'row',
  58. flexGrow: 0,
  59. justifyContent: 'center',
  60. marginBottom: BoxModel.margin / 2,
  61. paddingHorizontal: BoxModel.margin
  62. },
  63. /**
  64. * The style of toolbar buttons.
  65. */
  66. toolbarButton,
  67. /**
  68. * The icon style of the toolbar buttons.
  69. */
  70. toolbarButtonIcon,
  71. /**
  72. * The style of the root/top-level {@link Container} of {@link Toolbox}.
  73. */
  74. toolbox: {
  75. flexDirection: 'column',
  76. flexGrow: 0
  77. },
  78. /**
  79. * The style of toolbar buttons which display white icons.
  80. */
  81. whiteToolbarButton: {
  82. ...toolbarButton,
  83. backgroundColor: ColorPalette.buttonUnderlay
  84. },
  85. /**
  86. * The icon style of toolbar buttons which display white icons.
  87. */
  88. whiteToolbarButtonIcon: {
  89. ...toolbarButtonIcon,
  90. color: ColorPalette.white
  91. }
  92. });
  93. export default styles;
  94. /**
  95. * Styles for the hangup button.
  96. */
  97. export const hangupButtonStyles = {
  98. iconStyle: styles.whiteToolbarButtonIcon,
  99. style: styles.hangupButton,
  100. underlayColor: ColorPalette.buttonUnderlay
  101. };
  102. /**
  103. * Styles for buttons in the toolbar.
  104. */
  105. export const toolbarButtonStyles = {
  106. iconStyle: styles.toolbarButtonIcon,
  107. style: styles.toolbarButton
  108. };
  109. /**
  110. * Styles for toggled buttons in the toolbar.
  111. */
  112. export const toolbarToggledButtonStyles = {
  113. iconStyle: styles.whiteToolbarButtonIcon,
  114. style: styles.whiteToolbarButton
  115. };
  116. // Overflow menu:
  117. /**
  118. * Styles for the {@code OverflowMenu} items.
  119. *
  120. * These have been implemented as per the Material Design guidelines:
  121. * {@link https://material.io/guidelines/components/bottom-sheets.html}.
  122. */
  123. const overflowMenuStyles = createStyleSheet({
  124. /**
  125. * Container style for a {@code ToolboxItem} rendered in the
  126. * {@code OverflowMenu}.
  127. */
  128. container: {
  129. alignItems: 'center',
  130. flexDirection: 'row',
  131. height: 48
  132. },
  133. /**
  134. * Style for the {@code Icon} element in a {@code ToolboxItem} rendered in
  135. * the {@code OverflowMenu}.
  136. */
  137. icon: {
  138. fontSize: 24
  139. },
  140. /**
  141. * Style for the label in a {@code ToolboxItem} rendered in the
  142. * {@code OverflowMenu}.
  143. */
  144. label: {
  145. flexShrink: 1,
  146. fontSize: 16,
  147. marginLeft: 32,
  148. opacity: 0.90
  149. }
  150. });
  151. export const overflowMenuItemStyles = {
  152. iconStyle: overflowMenuStyles.icon,
  153. labelStyle: overflowMenuStyles.label,
  154. style: overflowMenuStyles.container,
  155. underlayColor: '#eee'
  156. };