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.

UndockIframeButton.js 819B

1234567891011121314151617181920212223242526272829
  1. // @flow
  2. import { translate } from '../../../base/i18n';
  3. import { IconUndock } from '../../../base/icons';
  4. import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
  5. declare var APP: Object;
  6. /**
  7. * Implementation of a button for notifying integrators that iframe should be undocked.
  8. */
  9. class UndockIframeButton extends AbstractButton<AbstractButtonProps, *> {
  10. accessibilityLabel = 'toolbar.accessibilityLabel.undock';
  11. icon = IconUndock;
  12. label = 'toolbar.undock';
  13. tooltip = 'toolbar.undock';
  14. /**
  15. * Handles clicking / pressing the button by triggering external api event.
  16. *
  17. * @protected
  18. * @returns {void}
  19. */
  20. _handleClick() {
  21. APP.API.notifyIframeDockStateChanged(false);
  22. }
  23. }
  24. export default translate(UndockIframeButton);