👽 Choix de période

publicodes
Mael 2018-11-16 14:13:18 +00:00
parent a7bfef8779
commit c347f4d617
2 changed files with 19 additions and 10 deletions

View File

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

View File

@ -205,3 +205,5 @@ De: From
En-dessous de: Below
Au-dessus de: Above
Taux final: Final rate
Mois: Month
Année: Year