import React from 'react' import { observer } from 'mobx-react' import algorithms from '../algorithms/index.js' import { RangeInput } from './RangeInput.js' import state from '../state.js' const FieldComponent = observer(({ field }) => { switch (field.type) { case 'range': let { name, id } = field return ( (field.value = val)} /> ) case 'checkbox': return ( <> {field.name} (field.value = e.target.checked)} checked={field.value} /> ) default: return Error: Field type {field.type} not known. } }) const Options = ({ fields }) => { return (
{fields.map((field, i) => ( ))}
) } @observer export class SimplificationControl extends React.Component { render() { return ( <>

Simplification

{algorithms.map((algo, i) => ( ))} ) } }