Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@filerobot/explorer / lib / components / Modals / EmbedVideo / EmbedVideo.hooks.js
Size: Mime:
import { useCallback } from 'react';
import { useModal } from '@filerobot/core/lib/hooks';
import EmbedVideoContent from './EmbedVideoContent';
import { useExplorerI18n } from '../../../hooks';
import { jsx as _jsx } from "react/jsx-runtime";
export var useEmbedVideoModal = function useEmbedVideoModal() {
  var toggleModal = useModal();
  var i18n = useExplorerI18n();
  var triggerEmbedVideoModal = useCallback(function (videoFile) {
    toggleModal({
      title: i18n('explorerEmbedModalTitle'),
      showTitleLabel: true,
      disableAutoClose: true,
      content: function content(_props) {
        return /*#__PURE__*/_jsx(EmbedVideoContent, {
          videoFile: videoFile
        });
      },
      buttonPrimaryLabel: i18n('explorerModalCloseButton'),
      hideSecondaryButton: true,
      enterKeySubmits: true,
      modalStyle: {
        maxWidth: 650,
        maxHeight: 668
      },
      modalHeaderStyle: {
        padding: '12px 24px 12px 0'
      },
      modalHeaderBottomBorder: true,
      modalFooterStyle: {
        flexDirection: 'row',
        height: 88,
        padding: 24,
        justifyContent: 'flex-end'
      },
      modalFooterTopBorder: true,
      primaryTitleStyle: {
        border: 'none',
        fontWeight: 400,
        fontSize: 18,
        lineHeight: '20px'
      },
      modalPrimaryButton: {
        maxWidth: 120
      },
      modalCrossButtonStyle: {
        margin: '10px 12px 10px 0'
      },
      onButtonPrimaryClick: function onButtonPrimaryClick(_ref) {
        var closeModal = _ref.closeModal;
        closeModal();
      }
    });
  }, [i18n]);
  return triggerEmbedVideoModal;
};