Add Spanish to language dropdown

This commit is contained in:
David Ralph
2020-10-28 17:02:01 +00:00
parent acc583f995
commit 2d12875476
5 changed files with 25 additions and 15 deletions

View File

@@ -2,19 +2,19 @@ import React from 'react';
export default class Dropdown extends React.PureComponent {
getLabel() {
return this.props.label ? <label htmlFor={this.props.name}>{this.props.label} </label> : null;
return this.props.label ? <label htmlFor={this.props.name}>{this.props.label}</label> : null;
}
render() {
return (
<>
<React.Fragment>
{this.getLabel()}
<div className='dropdown' style={{ display: 'inline' }}>
<select name={this.props.name} id={this.props.id} onChange={this.props.onChange}>
{this.props.children}
</select>
</div>
</>
</React.Fragment>
);
}
}

View File

@@ -12,8 +12,9 @@ export default class LanguageSettings extends React.PureComponent {
onChange={() => localStorage.setItem('language', document.getElementById('language').value)}
>
<option className='choices' value='en'>English</option>
<option className='choices' value='nl'>Nederlands</option>
<option className='choices' value='es'>Español</option>
<option className='choices' value='fr'>Français</option>
<option className='choices' value='nl'>Nederlands</option>
<option className='choices' value='no'>Norsk</option>
<option className='choices' value='ru'>Pусский</option>
</Dropdown>