@collectionspace/cspace-public-browser
Version:
CollectionSpace public browser
21 lines (16 loc) • 423 B
JavaScript
import { connect } from 'react-redux';
import Panel from './Panel';
import { isPanelExpanded } from '../../reducers';
import {
togglePanel,
} from '../../actions/prefsActions';
const mapStateToProps = (state, ownProps) => ({
isExpanded: isPanelExpanded(state, ownProps.id),
});
const mapDispatchToProps = {
onHeaderClick: togglePanel,
};
export default connect(
mapStateToProps,
mapDispatchToProps,
)(Panel);