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'
|
2018-11-14 17:24:57 +00:00
|
|
|
import './PeriodSwitch.css'
|
|
|
|
import { reduxForm } from 'redux-form'
|
2018-11-14 10:24:13 +00:00
|
|
|
|
2018-11-14 17:24:57 +00:00
|
|
|
export default reduxForm({
|
|
|
|
form: 'conversation',
|
|
|
|
destroyOnUnmount: false,
|
|
|
|
initialValues: { période: 'mois' }
|
|
|
|
})(function PeriodSwitch() {
|
2018-11-14 10:24:13 +00:00
|
|
|
return (
|
2018-11-14 17:24:57 +00:00
|
|
|
<div id="PeriodSwitch">
|
2018-11-14 10:24:13 +00:00
|
|
|
<>
|
|
|
|
<label>
|
|
|
|
<Field name="période" component="input" type="radio" value="mois" />
|
2018-11-14 17:24:57 +00:00
|
|
|
<span />
|
|
|
|
<span className="radioText">Mois</span>
|
2018-11-14 10:24:13 +00:00
|
|
|
</label>
|
2018-11-14 17:24:57 +00:00
|
|
|
|
2018-11-14 10:24:13 +00:00
|
|
|
<label>
|
|
|
|
<Field name="période" component="input" type="radio" value="année" />
|
2018-11-14 17:24:57 +00:00
|
|
|
<span />
|
|
|
|
|
|
|
|
<span className="radioText">Année</span>
|
2018-11-14 10:24:13 +00:00
|
|
|
</label>
|
|
|
|
</>
|
2018-11-14 17:24:57 +00:00
|
|
|
</div>
|
2018-11-14 10:24:13 +00:00
|
|
|
)
|
2018-11-14 17:24:57 +00:00
|
|
|
})
|