import React, { PropTypes } from 'react'
import { connect } from 'react-redux'
import classnames from 'classnames'
import * as flowsActions from '../../ducks/flows'
NavAction.propTypes = {
icon: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
onClick: PropTypes.func.isRequired,
}
function NavAction({ icon, title, onClick }) {
return (
{
event.preventDefault()
onClick(event)
}}>
)
}
Nav.propTypes = {
flow: PropTypes.object.isRequired,
active: PropTypes.string.isRequired,
tabs: PropTypes.array.isRequired,
onSelectTab: PropTypes.func.isRequired,
onRemove: PropTypes.func.isRequired,
onDuplicate: PropTypes.func.isRequired,
onReplay: PropTypes.func.isRequired,
onAccept: PropTypes.func.isRequired,
onRevert: PropTypes.func.isRequired,
}
function Nav({ flow, active, tabs, onSelectTab, onRemove, onDuplicate, onReplay, onAccept, onRevert }) {
return (
)
}
export default connect(
null,
{
onRemove: flowsActions.remove,
onDuplicate: flowsActions.duplicate,
onReplay: flowsActions.replay,
onAccept: flowsActions.accept,
onRevert: flowsActions.revert,
}
)(Nav)