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 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. import { BoxModel, ColorPalette, createStyleSheet } from '../../base/styles';
  2. /**
  3. * The base style for (toolbar) buttons.
  4. *
  5. * @type {Object}
  6. */
  7. const button = {
  8. borderRadius: 30,
  9. borderWidth: 0,
  10. flex: 0,
  11. flexDirection: 'row',
  12. height: 60,
  13. justifyContent: 'center',
  14. margin: BoxModel.margin,
  15. width: 60
  16. };
  17. /**
  18. * Small toolbar button.
  19. *
  20. * @type {{borderRadius: number, flex: number, flexDirection: string,
  21. * height: number, justifyContent: string, margin: number, width: number}}
  22. */
  23. const smallButton = {
  24. borderRadius: 20,
  25. flex: 0,
  26. flexDirection: 'column',
  27. height: 40,
  28. justifyContent: 'center',
  29. margin: BoxModel.margin / 2,
  30. width: 40
  31. };
  32. /**
  33. * The base style for icons.
  34. *
  35. * @type {Object}
  36. */
  37. const icon = {
  38. alignSelf: 'center',
  39. color: ColorPalette.darkGrey,
  40. fontSize: 24
  41. };
  42. /**
  43. * Small toolbar button icon.
  44. *
  45. * @type {{fontSize: number}}
  46. */
  47. const smallIcon = {
  48. ...icon,
  49. fontSize: 18
  50. };
  51. /**
  52. * The base style for toolbars.
  53. *
  54. * @type {Object}
  55. */
  56. const toolbar = {
  57. flex: 1,
  58. position: 'absolute'
  59. };
  60. /**
  61. * The (conference) Toolbox/Toolbar related styles.
  62. */
  63. export const styles = createStyleSheet({
  64. /**
  65. * The toolbar button icon style.
  66. */
  67. icon,
  68. /**
  69. * The style of the toolbar which contains the primary buttons such as
  70. * hangup, audio and video mute.
  71. */
  72. primaryToolbar: {
  73. ...toolbar,
  74. bottom: 3 * BoxModel.margin,
  75. flexDirection: 'row',
  76. justifyContent: 'center',
  77. left: 0,
  78. right: 0
  79. },
  80. /**
  81. * The style of button in primaryToolbar.
  82. */
  83. primaryToolbarButton: {
  84. ...button,
  85. backgroundColor: ColorPalette.white,
  86. opacity: 0.7
  87. },
  88. /**
  89. * The style of the toolbar which contains the secondary buttons such as
  90. * toggle camera facing mode.
  91. */
  92. secondaryToolbar: {
  93. ...toolbar,
  94. bottom: 0,
  95. flexDirection: 'column',
  96. right: BoxModel.margin,
  97. top: BoxModel.margin * 2
  98. },
  99. /**
  100. * The style of button in secondaryToolbar.
  101. */
  102. secondaryToolbarButton: {
  103. ...smallButton,
  104. backgroundColor: ColorPalette.darkGrey,
  105. opacity: 0.7
  106. },
  107. /**
  108. * The style of the root/top-level Container of Toolbar that contains
  109. * toolbars.
  110. */
  111. toolbarContainer: {
  112. bottom: 0,
  113. left: 0,
  114. position: 'absolute',
  115. right: 0,
  116. top: 0
  117. },
  118. /**
  119. * The toolbar white button icon style.
  120. */
  121. whiteIcon: {
  122. ...icon,
  123. color: ColorPalette.white
  124. },
  125. /**
  126. * The secondary toolbar icon style.
  127. */
  128. secondaryToolbarIcon: {
  129. ...smallIcon,
  130. color: ColorPalette.white
  131. }
  132. });