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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. // @flow
  2. import { StyleSheet } from 'react-native';
  3. import { BoxModel, ColorPalette, createStyleSheet } from '../../../base/styles';
  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: 60,
  42. width: 60
  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. bottom: 0,
  58. flex: 0,
  59. flexDirection: 'row',
  60. justifyContent: 'center',
  61. left: 0,
  62. marginBottom: BoxModel.margin / 2,
  63. paddingHorizontal: BoxModel.margin,
  64. position: 'absolute',
  65. right: 0
  66. },
  67. /**
  68. * The style of toolbar buttons.
  69. */
  70. toolbarButton,
  71. /**
  72. * The icon style of the toolbar buttons.
  73. */
  74. toolbarButtonIcon,
  75. /**
  76. * The style of the root/top-level {@link Container} of {@link Toolbox}.
  77. * This is the narrow layout version which locates the toolbar on top of
  78. * the filmstrip, at the bottom of the screen.
  79. */
  80. toolboxNarrow: {
  81. flexDirection: 'column',
  82. flexGrow: 1
  83. },
  84. /**
  85. * The style of the root/top-level {@link Container} of {@link Toolbox}.
  86. * This is the wide layout version which locates the toolbar at the bottom
  87. * of the screen.
  88. */
  89. toolboxWide: {
  90. ...StyleSheet.absoluteFillObject
  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.90
  163. }
  164. });
  165. export const overflowMenuItemStyles = {
  166. iconStyle: overflowMenuStyles.icon,
  167. labelStyle: overflowMenuStyles.label,
  168. style: overflowMenuStyles.container,
  169. underlayColor: '#eee'
  170. };