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    
Size: Mime:
import { useDispatch, useSelector } from 'react-redux';
import { SlideTransition } from '@filerobot/common';
import { selectCropPanelFile, cropPanelFileSet } from '../../slices/panels.slice';
import CropPanelContent from './CropPanelContent';
import { jsx as _jsx } from "react/jsx-runtime";
var CropPanel = function CropPanel(_ref) {
  var zIndex = _ref.zIndex;
  var dispatch = useDispatch();
  // uses crop panel for specific state, for future supporting files for crop, and others for download (in-case it's needed)
  var cropPanelFile = useSelector(selectCropPanelFile);
  var closeCropPanel = function closeCropPanel() {
    return dispatch(cropPanelFileSet(null));
  };
  return /*#__PURE__*/_jsx(SlideTransition, {
    zIndex: zIndex,
    handleClose: closeCropPanel,
    children: cropPanelFile && /*#__PURE__*/_jsx(CropPanelContent, {
      imageFile: cropPanelFile
    })
  });
};
export default CropPanel;