From 3b4cc7b84d24cd2595ca317a02722ac9e3d56cd4 Mon Sep 17 00:00:00 2001 From: mama Date: Fri, 13 Oct 2017 12:43:22 +0200 Subject: [PATCH] :sparkles: Formattage --- source/engine/mecanismViews/Somme.js | 45 +++++++++++++++------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/source/engine/mecanismViews/Somme.js b/source/engine/mecanismViews/Somme.js index f4260e784..0f4e91b51 100644 --- a/source/engine/mecanismViews/Somme.js +++ b/source/engine/mecanismViews/Somme.js @@ -1,24 +1,23 @@ import React, { Component } from "react" -import {makeJsx} from '../evaluation' -import {path} from 'ramda' -import {Node, NodeValue} from './common' +import { makeJsx } from "../evaluation" +import { path } from "ramda" +import { Node, NodeValue } from "./common" +export default ({ explanation, nodeValue }) => ( + } + /> +) -export default ({explanation, nodeValue}) => - } - /> - -let Table = ({explanation}) => - - {explanation.map((v, i) => )} - -
-
- +let Table = ({ explanation }) => ( + + {explanation.map((v, i) => )} +
+
+) /* La colonne peut au clic afficher une nouvelle colonne qui sera une autre somme imbriquée */ class Row extends Component { @@ -26,12 +25,16 @@ class Row extends Component { folded: true } render() { - let {v, i} = this.props, + let { v, i } = this.props, rowFormula = path(["explanation", "formule", "explanation"], v), isSomme = rowFormula && rowFormula.name == "somme" return [ - this.setState({folded: false})}> + this.setState({ folded: false })} + > {i != 0 && "+"} {makeJsx(v)} @@ -43,7 +46,7 @@ class Row extends Component { - +
]