1
0
Fork 0
mirror of https://github.com/betagouv/mon-entreprise synced 2025-02-10 13:55:03 +00:00
mon-entreprise/components/SelectedVariable.js
Mael Thomas 59a64d6573 Display higher order variables only, filterable by tag
Use Ramda.js
[data] Rename values to historique
Introduce the selectedVariable full screen view
2016-07-27 11:50:49 +02:00

30 lines
552 B
JavaScript

import React, { Component } from 'react'
export default class SelectedVariable extends Component {
render() {
let {
variable: {
name,
first: {
description
},
tags
},
selectedTags
} = this.props
return (
<section id="selected-variable">
<h1>{name}</h1>
<p>{description}</p>
<ul>
{Object.keys(tags)
.filter(name => !selectedTags.find(([n]) => name == n))
.map(name =>
<li key={name}>
{name + ': ' + tags[name]}
</li>
)}
</ul>
</section>)
}
}