just-paja/radio-drama-queen

View on GitHub
src/soundLibraries/components/OpenLibraryButton.jsx

Summary

Maintainability
A
0 mins
Test Coverage
import CloudDownload from '@material-ui/icons/CloudDownload'
import LabelButton from '../../components/LabelButton'

import { connect } from 'react-redux'
import { noArgs } from '../../components'
import { OpenLibraryDialog } from './OpenLibraryDialog'

const mapStateToProps = () => ({
  children: 'Add library',
  icon: CloudDownload
})

const mapDispatchToProps = {
  onClick: noArgs(OpenLibraryDialog.open)
}

export const OpenLibraryButton = connect(
  mapStateToProps,
  mapDispatchToProps
)(LabelButton)