mon-entreprise/source/components/RuleLink.js

20 lines
485 B
JavaScript
Raw Normal View History

/* @flow */
2018-07-12 08:09:41 +00:00
import withColours from 'Components/utils/withColours'
import React from 'react'
import { Link } from 'react-router-dom'
import './RuleLink.css'
2018-07-12 08:09:41 +00:00
import type { Règle } from 'Types/ResultViewTypes'
type Props = Règle
const RuleLink = ({
lien,
nom,
colours: { colour },
style
}: Props & { colours: { colour: string }, style: any }) => (
<Link to={lien} className="rule-link" style={{ color: colour, ...style }}>
{nom}
</Link>
)
export default withColours(RuleLink)