Repository URL to install this package:
|
Version:
3.12.20 ▾
|
import { useDispatch, useSelector } from 'react-redux';
import { allPanelsClosed, selectActivePickerPanel } from '../../slices/panels.slice';
import { SlideTransition } from '@filerobot/common';
import PickerPanelContent from './PickerPanelContent';
import { jsx as _jsx } from "react/jsx-runtime";
var PickerPanel = function PickerPanel(_ref) {
var zIndex = _ref.zIndex;
var dispatch = useDispatch();
var activePickerPanel = useSelector(selectActivePickerPanel);
var closeAllPanels = function closeAllPanels() {
return dispatch(allPanelsClosed());
};
return /*#__PURE__*/_jsx(SlideTransition, {
zIndex: zIndex,
handleClose: closeAllPanels,
children: activePickerPanel && /*#__PURE__*/_jsx(PickerPanelContent, {
activePickerPanel: activePickerPanel
})
});
};
export default PickerPanel;