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.1KB

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