您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

OverlayFrame.tsx 1.2KB

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