16 lines
279 B
JavaScript
16 lines
279 B
JavaScript
|
import React from 'react'
|
||
|
import R from 'ramda'
|
||
|
|
||
|
export let NodeValue = ({data}) => do {
|
||
|
let valeur = data == null ?
|
||
|
'?'
|
||
|
: ( R.is(Number)(data) ?
|
||
|
Math.round(data)
|
||
|
: ( data ? 'oui' : 'non')
|
||
|
)
|
||
|
|
||
|
;<span className={"value " + valeur}>←
|
||
|
{valeur}
|
||
|
</span>
|
||
|
}
|