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

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