1
0
Fork 0
mirror of https://github.com/betagouv/mon-entreprise synced 2025-02-08 19:55:00 +00:00
mon-entreprise/source/components/PeriodSwitch.js
2018-11-23 16:01:13 +00:00

31 lines
771 B
JavaScript

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'
export default reduxForm({
form: 'conversation',
destroyOnUnmount: false,
initialValues: { période: 'mois' }
})(function PeriodSwitch() {
return (
<div id="PeriodSwitch">
<>
<label>
<Field name="période" component="input" type="radio" value="mois" />
<span />
<span className="radioText">Mois</span>
</label>
<label>
<Field name="période" component="input" type="radio" value="année" />
<span />
<span className="radioText">Année</span>
</label>
</>
</div>
)
})