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.

InfoDialogButton.web.js 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import React, { Component } from 'react';
  2. import { ToolbarButtonWithDialog } from '../../toolbox';
  3. import InfoDialog from './InfoDialog';
  4. /**
  5. * A configuration object to describe how {@code ToolbarButton} should render
  6. * the button.
  7. *
  8. * @type {object}
  9. */
  10. const DEFAULT_BUTTON_CONFIGURATION = {
  11. buttonName: 'info',
  12. classNames: [ 'button', 'icon-info' ],
  13. enabled: true,
  14. id: 'toolbar_button_info',
  15. tooltipKey: 'info.tooltip'
  16. };
  17. /**
  18. * A React Component for displaying a button which opens a dialog with
  19. * information about the conference and with ways to invite people.
  20. *
  21. * @extends Component
  22. */
  23. class InfoDialogButton extends Component {
  24. /**
  25. * Implements React's {@link Component#render()}.
  26. *
  27. * @inheritdoc
  28. * @returns {ReactElement}
  29. */
  30. render() {
  31. return (
  32. <ToolbarButtonWithDialog
  33. { ...this.props }
  34. button = { DEFAULT_BUTTON_CONFIGURATION }
  35. content = { InfoDialog } />
  36. );
  37. }
  38. }
  39. export default InfoDialogButton;