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

OverlayFrame.js 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // @flow
  2. import React, { Component } from 'react';
  3. declare var interfaceConfig: Object;
  4. /**
  5. * The type of the React {@code Component} props of {@link OverlayFrame}.
  6. */
  7. type Props = {
  8. /**
  9. * The children components to be displayed into the overlay frame.
  10. */
  11. children: React$Node,
  12. /**
  13. * Indicates the css style of the overlay. If true, then lighter; darker,
  14. * otherwise.
  15. */
  16. isLightOverlay?: boolean,
  17. /**
  18. * The style property.
  19. */
  20. style: Object
  21. };
  22. /**
  23. * Implements a React {@link Component} for the frame of the overlays.
  24. */
  25. export default class OverlayFrame extends Component<Props> {
  26. /**
  27. * Implements React's {@link Component#render()}.
  28. *
  29. * @inheritdoc
  30. * @returns {ReactElement|null}
  31. */
  32. render() {
  33. return (
  34. <div
  35. className = { this.props.isLightOverlay ? 'overlay__container-light' : 'overlay__container' }
  36. id = 'overlay'
  37. style = { this.props.style }>
  38. <div className = { 'overlay__content' }>
  39. {
  40. this.props.children
  41. }
  42. </div>
  43. </div>
  44. );
  45. }
  46. }