Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

styles.js 4.3KB

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