Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

OverlayFrame.js 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. /**
  19. * Implements a React {@link Component} for the frame of the overlays.
  20. */
  21. export default class OverlayFrame extends Component<Props> {
  22. /**
  23. * Implements React's {@link Component#render()}.
  24. *
  25. * @inheritdoc
  26. * @returns {ReactElement|null}
  27. */
  28. render() {
  29. return (
  30. <div
  31. className = { this.props.isLightOverlay ? 'overlay__container-light' : 'overlay__container' }
  32. id = 'overlay'>
  33. <div className = { 'overlay__content' }>
  34. {
  35. this.props.children
  36. }
  37. </div>
  38. </div>
  39. );
  40. }
  41. }