rename serach engine

jh-changes
Shin'ya Ueoka 7 years ago
parent 7e2c2476ef
commit d195890eb9
  1. 12
      src/settings/components/form/search-form.jsx
  2. 2
      src/settings/components/form/search-form.scss
  3. 4
      src/settings/components/index.jsx

@ -1,9 +1,9 @@
import './search-engine-form.scss';
import './search-form.scss';
import { h, Component } from 'preact';
import AddButton from '../ui/add-button';
import DeleteButton from '../ui/delete-button';
class SearchEngineForm extends Component {
class SearchForm extends Component {
render() {
let value = this.props.value;
@ -15,15 +15,15 @@ class SearchEngineForm extends Component {
engines
} = value;
return <div className='form-search-engine-form'>
<div className='form-search-engine-form-header'>
return <div className='form-search-form'>
<div className='form-search-form-header'>
<div className='column-name'>Name</div>
<div className='column-url'>URL</div>
<div className='column-option'>Default</div>
</div>
{
engines.map((engine, index) => {
return <div key={index} className='form-search-engine-form-row'>
return <div key={index} className='form-search-form-row'>
<input data-index={index} type='text' name='name'
className='column-name' value={engine[0]}
onChange={this.bindValue.bind(this)} />
@ -70,4 +70,4 @@ class SearchEngineForm extends Component {
}
}
export default SearchEngineForm;
export default SearchForm;

@ -1,4 +1,4 @@
.form-search-engine-form {
.form-search-form {
@mixin row-base {
display: flex;

@ -1,7 +1,7 @@
import './site.scss';
import { h, Component } from 'preact';
import Input from './ui/input';
import SearchEngineForm from './form/search-engine-form';
import SearchForm from './form/search-form';
import KeymapsForm from './form/keymaps-form';
import BlacklistForm from './form/blacklist-form';
import * as settingActions from 'settings/actions/setting';
@ -49,7 +49,7 @@ class SettingsComponent extends Component {
</fieldset>
<fieldset>
<legend>Search Engines</legend>
<SearchEngineForm
<SearchForm
value={this.state.settings.form.search}
onChange={value => this.bindForm('search', value)}
/>