Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

JitsiThemeProvider.web.tsx 1022B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { ThemeProvider } from '@material-ui/core/styles';
  2. import * as React from 'react';
  3. import { connect } from 'react-redux';
  4. import BaseTheme from './BaseTheme.web';
  5. type Props = {
  6. /**
  7. * The default theme or theme set through advanced branding.
  8. */
  9. _theme: Object,
  10. /**
  11. * The children of the component.
  12. */
  13. children: React.ReactNode
  14. }
  15. /**
  16. * The theme provider for the web app.
  17. *
  18. * @param {Object} props - The props of the component.
  19. * @returns {React.ReactNode}
  20. */
  21. function JitsiThemeProvider(props: Props) {
  22. return <ThemeProvider theme = { props._theme }>{ props.children }</ThemeProvider>;
  23. }
  24. /**
  25. * Maps part of the Redux state to the props of this component.
  26. *
  27. * @param {Object} state - The Redux state.
  28. * @returns {Props}
  29. */
  30. function _mapStateToProps(state: any) {
  31. const { muiBrandedTheme } = state['features/dynamic-branding'];
  32. return {
  33. _theme: muiBrandedTheme || BaseTheme
  34. };
  35. }
  36. export default connect(_mapStateToProps)(JitsiThemeProvider);