delete button
This commit is contained in:
parent
2641183a5b
commit
bbad1c6c6a
4 changed files with 27 additions and 15 deletions
|
@ -1,5 +1,6 @@
|
||||||
import { h, Component } from 'preact';
|
|
||||||
import './search-engine-form.scss';
|
import './search-engine-form.scss';
|
||||||
|
import { h, Component } from 'preact';
|
||||||
|
import DeleteButton from '../ui/delete-button';
|
||||||
|
|
||||||
class SearchEngineForm extends Component {
|
class SearchEngineForm extends Component {
|
||||||
|
|
||||||
|
@ -33,8 +34,7 @@ class SearchEngineForm extends Component {
|
||||||
<input data-index={index} type='radio' name='default'
|
<input data-index={index} type='radio' name='default'
|
||||||
checked={defaultEngine === engine[0]}
|
checked={defaultEngine === engine[0]}
|
||||||
onChange={this.bindValue.bind(this)} />
|
onChange={this.bindValue.bind(this)} />
|
||||||
<input data-index={index} type='button' name='delete'
|
<DeleteButton data-index={index} name='delete'
|
||||||
value='✖'
|
|
||||||
onClick={this.bindValue.bind(this)} />
|
onClick={this.bindValue.bind(this)} />
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
|
|
|
@ -22,17 +22,5 @@
|
||||||
|
|
||||||
&-row {
|
&-row {
|
||||||
@include row-base;
|
@include row-base;
|
||||||
|
|
||||||
.column-option input[type='button'] {
|
|
||||||
border: none;
|
|
||||||
padding: 4;
|
|
||||||
display: inline;
|
|
||||||
background: none;
|
|
||||||
color: red;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: darkred;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
12
src/settings/components/ui/delete-button.jsx
Normal file
12
src/settings/components/ui/delete-button.jsx
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
import './delete-button.scss';
|
||||||
|
import { h, Component } from 'preact';
|
||||||
|
|
||||||
|
class DeleteButton extends Component {
|
||||||
|
render() {
|
||||||
|
return <input
|
||||||
|
className='ui-delete-button' type='button' value='✖'
|
||||||
|
{...this.props} />;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default DeleteButton;
|
12
src/settings/components/ui/delete-button.scss
Normal file
12
src/settings/components/ui/delete-button.scss
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
.ui-delete-button {
|
||||||
|
border: none;
|
||||||
|
padding: 4;
|
||||||
|
display: inline;
|
||||||
|
background: none;
|
||||||
|
color: red;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: darkred;
|
||||||
|
}
|
||||||
|
}
|
Reference in a new issue