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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. // @flow
  2. import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
  3. import { BoxModel, ColorPalette } from '../../../base/styles';
  4. const BUTTON_SIZE = 48;
  5. // Toolbox, toolbar:
  6. /**
  7. * The style of toolbar buttons.
  8. */
  9. const toolbarButton = {
  10. borderRadius: 3,
  11. borderWidth: 0,
  12. flex: 0,
  13. flexDirection: 'row',
  14. height: BUTTON_SIZE,
  15. justifyContent: 'center',
  16. marginHorizontal: 6,
  17. marginTop: 6,
  18. width: BUTTON_SIZE
  19. };
  20. /**
  21. * The icon style of the toolbar buttons.
  22. */
  23. const toolbarButtonIcon = {
  24. alignSelf: 'center',
  25. color: ColorPalette.darkGrey,
  26. fontSize: 24
  27. };
  28. /**
  29. * The icon style of toolbar buttons which display white icons.
  30. */
  31. const whiteToolbarButtonIcon = {
  32. ...toolbarButtonIcon,
  33. color: ColorPalette.white
  34. };
  35. /**
  36. * The Toolbox and toolbar related styles.
  37. */
  38. const styles = {
  39. expandMenuContainer: {
  40. alignItems: 'center',
  41. borderTopLeftRadius: 16,
  42. borderTopRightRadius: 16,
  43. flexDirection: 'column'
  44. },
  45. sheetGestureRecognizer: {
  46. alignItems: 'stretch',
  47. flexDirection: 'column'
  48. },
  49. /**
  50. * The style of the toolbar.
  51. */
  52. toolbox: {
  53. alignItems: 'center',
  54. backgroundColor: ColorPalette.darkBackground,
  55. borderTopLeftRadius: 3,
  56. borderTopRightRadius: 3,
  57. flexDirection: 'row',
  58. flexGrow: 0,
  59. justifyContent: 'space-between',
  60. paddingHorizontal: BoxModel.margin,
  61. paddingVertical: 8
  62. },
  63. /**
  64. * The style of the root/top-level container of {@link Toolbox}.
  65. */
  66. toolboxContainer: {
  67. flexDirection: 'column',
  68. flexGrow: 0,
  69. width: '100%',
  70. maxWidth: 580,
  71. marginLeft: 'auto',
  72. marginRight: 'auto'
  73. }
  74. };
  75. export default styles;
  76. /**
  77. * Color schemed styles for the @{Toolbox} component.
  78. */
  79. ColorSchemeRegistry.register('Toolbox', {
  80. /**
  81. * Styles for buttons in the toolbar.
  82. */
  83. buttonStyles: {
  84. iconStyle: toolbarButtonIcon,
  85. style: toolbarButton
  86. },
  87. buttonStylesBorderless: {
  88. iconStyle: whiteToolbarButtonIcon,
  89. style: {
  90. ...toolbarButton,
  91. backgroundColor: 'transparent'
  92. }
  93. },
  94. backgroundToggle: {
  95. backgroundColor: ColorPalette.toggled
  96. },
  97. hangupButtonStyles: {
  98. iconStyle: whiteToolbarButtonIcon,
  99. style: {
  100. ...toolbarButton,
  101. backgroundColor: schemeColor('hangup')
  102. },
  103. underlayColor: ColorPalette.buttonUnderlay
  104. },
  105. /**
  106. * Styles for toggled buttons in the toolbar.
  107. */
  108. toggledButtonStyles: {
  109. iconStyle: whiteToolbarButtonIcon,
  110. style: {
  111. ...toolbarButton
  112. }
  113. }
  114. });