Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

DockIframeButton.js 802B

1234567891011121314151617181920212223242526272829
  1. // @flow
  2. import { translate } from '../../../base/i18n';
  3. import { IconDock } 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 docked.
  8. */
  9. class DockIframeButton extends AbstractButton<AbstractButtonProps, *> {
  10. accessibilityLabel = 'toolbar.accessibilityLabel.dock';
  11. icon = IconDock;
  12. label = 'toolbar.dock';
  13. tooltip = 'toolbar.dock';
  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(true);
  22. }
  23. }
  24. export default translate(DockIframeButton);