mirror of
				https://github.com/Alamantus/Lexiconga.git
				synced 2025-11-04 10:17:01 +01:00 
			
		
		
		
	Minor cleanup
This commit is contained in:
		
							parent
							
								
									edbe5cbcb0
								
							
						
					
					
						commit
						ec19dfc583
					
				
					 6 changed files with 37 additions and 24 deletions
				
			
		| 
						 | 
				
			
			@ -1,5 +1,4 @@
 | 
			
		|||
import Inferno from 'inferno';
 | 
			
		||||
import Component from 'inferno-component';
 | 
			
		||||
 | 
			
		||||
export const GeneralDisplay = ({
 | 
			
		||||
    partsOfSpeech,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,4 @@
 | 
			
		|||
import Inferno from 'inferno';
 | 
			
		||||
import Component from 'inferno-component';
 | 
			
		||||
import marked from 'marked';
 | 
			
		||||
import sanitizeHtml from 'sanitize-html';
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,35 +28,48 @@ export class WordDisplay extends Component {
 | 
			
		|||
 | 
			
		||||
        <section className='card-content'>
 | 
			
		||||
          <div className='content'>
 | 
			
		||||
            {(this.props.word.pronunciation || this.props.word.partOfSpeech)
 | 
			
		||||
              && (<p>
 | 
			
		||||
                    {(this.props.word.partOfSpeech)
 | 
			
		||||
                      ? (<small>{ this.props.word.partOfSpeech }</small>)
 | 
			
		||||
                      : ''}
 | 
			
		||||
                  
 | 
			
		||||
                    {(this.props.word.partOfSpeech && this.props.word.pronunciation)
 | 
			
		||||
                      ? ' | '
 | 
			
		||||
                      : ''}
 | 
			
		||||
                  
 | 
			
		||||
                    {(this.props.word.pronunciation)
 | 
			
		||||
                      ? (<small>{ this.props.word.pronunciation }</small>)
 | 
			
		||||
                      : ''}
 | 
			
		||||
                  </p>
 | 
			
		||||
                )}
 | 
			
		||||
            {
 | 
			
		||||
              (this.props.word.pronunciation || this.props.word.partOfSpeech)
 | 
			
		||||
              && (
 | 
			
		||||
                <p>
 | 
			
		||||
                  {
 | 
			
		||||
                    (this.props.word.partOfSpeech)
 | 
			
		||||
                    ? (<small>{ this.props.word.partOfSpeech }</small>)
 | 
			
		||||
                    : ''
 | 
			
		||||
                  }
 | 
			
		||||
                
 | 
			
		||||
                  {
 | 
			
		||||
                    (this.props.word.partOfSpeech && this.props.word.pronunciation)
 | 
			
		||||
                    ? ' | '
 | 
			
		||||
                    : ''
 | 
			
		||||
                  }
 | 
			
		||||
                
 | 
			
		||||
                  {
 | 
			
		||||
                    (this.props.word.pronunciation)
 | 
			
		||||
                    ? (<small>{ this.props.word.pronunciation }</small>)
 | 
			
		||||
                    : ''
 | 
			
		||||
                  }
 | 
			
		||||
                </p>
 | 
			
		||||
              )
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            {(this.props.word.definition)
 | 
			
		||||
            {
 | 
			
		||||
              (this.props.word.definition)
 | 
			
		||||
              && (
 | 
			
		||||
                <p>
 | 
			
		||||
                  { this.props.word.definition }
 | 
			
		||||
                </p>
 | 
			
		||||
                )}
 | 
			
		||||
              )
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            {(this.props.word.details)
 | 
			
		||||
            {
 | 
			
		||||
              (this.props.word.details)
 | 
			
		||||
              && (
 | 
			
		||||
                <p>
 | 
			
		||||
                  { this.props.word.details }
 | 
			
		||||
                </p>
 | 
			
		||||
                )}
 | 
			
		||||
              )
 | 
			
		||||
            }
 | 
			
		||||
          </div>
 | 
			
		||||
        </section>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,4 @@
 | 
			
		|||
import Inferno from 'inferno';
 | 
			
		||||
import Component from 'inferno-component';
 | 
			
		||||
 | 
			
		||||
export const EditDictionaryForm = ({
 | 
			
		||||
  editDictionaryModal,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,4 @@
 | 
			
		|||
import Inferno from 'inferno';
 | 
			
		||||
import Component from 'inferno-component';
 | 
			
		||||
 | 
			
		||||
import { IPAField } from '../IPAField';
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,7 +2,11 @@ import Inferno from 'inferno';
 | 
			
		|||
 | 
			
		||||
import {IPAField} from './IPAField';
 | 
			
		||||
 | 
			
		||||
export const IPATable = ({ value, close, update }) => {
 | 
			
		||||
export const IPATable = ({
 | 
			
		||||
  value,
 | 
			
		||||
  close,
 | 
			
		||||
  update
 | 
			
		||||
}) => {
 | 
			
		||||
/*
 | 
			
		||||
  Modified from KeyboardFire's Phondue project (https://github.com/KeyboardFire/phondue)
 | 
			
		||||
  to fit React/Inferno and Lexiconga
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue