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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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 audio only (secondary) toolbar icon style.
  66. */
  67. audioOnlyIcon: {
  68. ...smallIcon,
  69. color: ColorPalette.white,
  70. transform: [ { rotate: '135deg' } ]
  71. },
  72. /**
  73. * The toolbar button icon style.
  74. */
  75. icon,
  76. /**
  77. * The style of the toolbar which contains the primary buttons such as
  78. * hangup, audio and video mute.
  79. */
  80. primaryToolbar: {
  81. ...toolbar,
  82. bottom: 3 * BoxModel.margin,
  83. flexDirection: 'row',
  84. justifyContent: 'center',
  85. left: 0,
  86. right: 0
  87. },
  88. /**
  89. * The style of button in primaryToolbar.
  90. */
  91. primaryToolbarButton: {
  92. ...button,
  93. backgroundColor: ColorPalette.white,
  94. opacity: 0.7
  95. },
  96. /**
  97. * The style of the toolbar which contains the secondary buttons such as
  98. * toggle camera facing mode.
  99. */
  100. secondaryToolbar: {
  101. ...toolbar,
  102. bottom: 0,
  103. flexDirection: 'column',
  104. right: BoxModel.margin,
  105. top: BoxModel.margin * 2
  106. },
  107. /**
  108. * The style of button in secondaryToolbar.
  109. */
  110. secondaryToolbarButton: {
  111. ...smallButton,
  112. backgroundColor: ColorPalette.darkGrey,
  113. opacity: 0.7
  114. },
  115. /**
  116. * The secondary toolbar icon style.
  117. */
  118. secondaryToolbarIcon: {
  119. ...smallIcon,
  120. color: ColorPalette.white
  121. },
  122. /**
  123. * The style of the root/top-level Container of Toolbar that contains
  124. * toolbars.
  125. */
  126. toolbarContainer: {
  127. bottom: 0,
  128. left: 0,
  129. position: 'absolute',
  130. right: 0,
  131. top: 0
  132. },
  133. /**
  134. * The toolbar white button icon style.
  135. */
  136. whiteIcon: {
  137. ...icon,
  138. color: ColorPalette.white
  139. }
  140. });