mon-entreprise/source/components/PeriodSwitch.js

32 lines
771 B
JavaScript
Raw Normal View History

2018-11-14 10:24:13 +00:00
import withColours from 'Components/utils/withColours'
import React, { Component } from 'react'
import { translate } from 'react-i18next'
import { Field } from 'redux-form'
import './PeriodSwitch.css'
import { reduxForm } from 'redux-form'
2018-11-14 10:24:13 +00:00
export default reduxForm({
form: 'conversation',
destroyOnUnmount: false,
initialValues: { période: 'mois' }
})(function PeriodSwitch() {
2018-11-14 10:24:13 +00:00
return (
<div id="PeriodSwitch">
2018-11-14 10:24:13 +00:00
<>
<label>
<Field name="période" component="input" type="radio" value="mois" />
<span />
<span className="radioText">Mois</span>
2018-11-14 10:24:13 +00:00
</label>
2018-11-14 10:24:13 +00:00
<label>
<Field name="période" component="input" type="radio" value="année" />
<span />
<span className="radioText">Année</span>
2018-11-14 10:24:13 +00:00
</label>
</>
</div>
2018-11-14 10:24:13 +00:00
)
})