20 lines
485 B
JavaScript
20 lines
485 B
JavaScript
|
/* @flow */
|
||
|
import withColours from 'Components/utils/withColours'
|
||
|
import React from 'react'
|
||
|
import { Link } from 'react-router-dom'
|
||
|
import './RuleLink.css'
|
||
|
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)
|