aboutsummaryrefslogtreecommitdiff
path: root/src/settings/components/form/blacklist-form.jsx
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-11-25 15:08:41 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-11-26 11:45:05 +0900
commit507000619377f82ca63251c8c5db98af690a5ed2 (patch)
treea08a8b6b8dca715d22f35b69b6b20c2b0ec0499c /src/settings/components/form/blacklist-form.jsx
parentdf10208ed5dfbc823eb1979272903d74f02a898c (diff)
add button
Diffstat (limited to 'src/settings/components/form/blacklist-form.jsx')
-rw-r--r--src/settings/components/form/blacklist-form.jsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/settings/components/form/blacklist-form.jsx b/src/settings/components/form/blacklist-form.jsx
index 83b54da..9cb547b 100644
--- a/src/settings/components/form/blacklist-form.jsx
+++ b/src/settings/components/form/blacklist-form.jsx
@@ -1,4 +1,5 @@
import './blacklist-form.scss';
+import AddButton from '../ui/add-button';
import DeleteButton from '../ui/delete-button';
import { h, Component } from 'preact';
@@ -22,6 +23,7 @@ class BlacklistForm extends Component {
</div>;
})
}
+ <AddButton name='add' onClick={this.bindValue.bind(this)} />
</div>;
}
@@ -36,6 +38,8 @@ class BlacklistForm extends Component {
if (name === 'url') {
next[index] = e.target.value;
+ } else if (name === 'add') {
+ next.push('');
} else if (name === 'delete') {
next.splice(index, 1);
}