1
0
Fork 0
mirror of https://github.com/Alamantus/Lexiconga.git synced 2025-08-18 03:31:22 +02:00
Lexiconga/src/components/MainDisplay.jsx
Robbie Antenesse 6bb8a6306a Enable switching details from DictionaryDetails menu.
Add Phonology section to DictionaryDetails.
Update DictionaryDetails and MainDisplay to have more data to work with and display.
2017-08-17 13:53:48 -06:00

64 lines
2.1 KiB
JavaScript

import Inferno from 'inferno';
import { LeftColumn } from './structure/LeftColumn';
import { RightColumn } from './structure/RightColumn';
import { WordForm } from './management/WordForm';
import { DictionaryDetails } from './display/DictionaryDetails';
import { WordsList } from './display/WordsList';
export const MainDisplay = ({ dictionaryInfo, wordsToDisplay, updateDisplay, updater, lastRender }) => {
return (
<section className='section'>
<div className='container'>
<div className='columns'>
<LeftColumn>
<WordForm
updateDisplay={ () => updateDisplay() }
partsOfSpeech={ dictionaryInfo.partsOfSpeech }
/>
</LeftColumn>
<RightColumn>
<DictionaryDetails
updater={ updater }
name={ dictionaryInfo.name }
specification={ dictionaryInfo.specification }
description={ dictionaryInfo.description }
partsOfSpeech={ dictionaryInfo.partsOfSpeech }
alphabeticalOrder={['b', 'p', 't', 'd', 'a', 'o', 'j', 'e']}
details={{
phonology: {
consonants: ['b', 'p', 'd', 't', 'j'],
vowels: ['a', 'o', 'e'],
blends: ['ae', 'oe', 'tj', 'dy'],
phonotactics: {
onset: ['b', 'p', 'j'],
nucleus: ['a', 'o', 'e'],
coda: ['any'],
exceptions: 'There are no exceptions',
},
},
grammar: {
content: 'The rules of the language are simple: just follow them!'
},
custom: [
{
name: 'Test Tab',
content: 'This is a test tab to test how custom tabs work!',
}
],
}}
/>
<WordsList
lastRender={ lastRender }
words={ wordsToDisplay } />
</RightColumn>
</div>
</div>
</section>
);
}