feature-change-applier/src/PhonoChangeApplier.js

32 lines
1.1 KiB
JavaScript
Raw Normal View History

2019-11-27 02:39:40 +00:00
import React, { useState } from 'react';
2019-11-26 22:42:19 +00:00
import './PhonoChangeApplier.scss';
import ProtoLang from './components/ProtoLang';
2019-11-27 02:44:07 +00:00
import Features from './components/Features';
2019-11-29 23:36:55 +00:00
import Epochs from './components/Epochs';
import Options from './components/Options';
2019-11-26 22:42:19 +00:00
const PhonoChangeApplier = () => {
2019-11-27 07:34:00 +00:00
const [ lexicon, setLexicon ] = useState(['one']);
const [ phonemes, setPhonemes ] = useState(
2019-11-27 07:34:00 +00:00
{ phoneme: [ 'feature' ] }
);
const [ epochs, setEpochs ] = useState([{name: 'epoch 1', changes:['[+ feature]>[- feature]/_#']}]);
2019-11-30 06:54:52 +00:00
const [ options, setOptions ] = useState({output: 'default', save: false})
const runChanges = e => {
e.preventDefault();
console.log('running...')
}
2019-11-27 02:39:40 +00:00
return (
<div className="PhonoChangeApplier" data-testid="PhonoChangeApplier">
2019-11-27 02:39:40 +00:00
<ProtoLang lexicon={lexicon} setLexicon={setLexicon}/>
2019-11-27 07:34:00 +00:00
<Features phonemes={phonemes} setPhonemes={setPhonemes}/>
<Epochs epochs={epochs} setEpochs={setEpochs}/>
<Options options={options} setOptions={setOptions} runChanges={runChanges}/>
</div>
);
2019-11-26 22:42:19 +00:00
}
export default PhonoChangeApplier;