aboutsummaryrefslogtreecommitdiff
path: root/src/settings/components/ui
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-04-30 13:05:06 +0900
committerGitHub <noreply@github.com>2019-04-30 13:05:06 +0900
commit457d954e08923b4accd28a919c72d0b61db1bb98 (patch)
tree9d198f7c7d37893621d4e2a27749070a435854cd /src/settings/components/ui
parent3d9a251ce293885cda57cd3eebd111f6181132f0 (diff)
parent037ee5fd40af0117a1eb8d362b4ae97429499f16 (diff)
Merge pull request #576 from ueokande/move-to-react
Move to React
Diffstat (limited to 'src/settings/components/ui')
-rw-r--r--src/settings/components/ui/AddButton.jsx (renamed from src/settings/components/ui/add-button.jsx)6
-rw-r--r--src/settings/components/ui/AddButton.scss (renamed from src/settings/components/ui/add-button.scss)0
-rw-r--r--src/settings/components/ui/DeleteButton.jsx (renamed from src/settings/components/ui/delete-button.jsx)6
-rw-r--r--src/settings/components/ui/DeleteButton.scss (renamed from src/settings/components/ui/delete-button.scss)0
-rw-r--r--src/settings/components/ui/Input.jsx (renamed from src/settings/components/ui/input.jsx)14
-rw-r--r--src/settings/components/ui/Input.scss (renamed from src/settings/components/ui/input.scss)0
6 files changed, 17 insertions, 9 deletions
diff --git a/src/settings/components/ui/add-button.jsx b/src/settings/components/ui/AddButton.jsx
index 79292d8..185a03b 100644
--- a/src/settings/components/ui/add-button.jsx
+++ b/src/settings/components/ui/AddButton.jsx
@@ -1,7 +1,7 @@
-import './add-button.scss';
-import { h, Component } from 'preact';
+import './AddButton.scss';
+import React from 'react';
-class AddButton extends Component {
+class AddButton extends React.Component {
render() {
return <input
className='ui-add-button' type='button' value='&#x271a;'
diff --git a/src/settings/components/ui/add-button.scss b/src/settings/components/ui/AddButton.scss
index beb5688..beb5688 100644
--- a/src/settings/components/ui/add-button.scss
+++ b/src/settings/components/ui/AddButton.scss
diff --git a/src/settings/components/ui/delete-button.jsx b/src/settings/components/ui/DeleteButton.jsx
index 8077a76..75811cd 100644
--- a/src/settings/components/ui/delete-button.jsx
+++ b/src/settings/components/ui/DeleteButton.jsx
@@ -1,7 +1,7 @@
-import './delete-button.scss';
-import { h, Component } from 'preact';
+import './DeleteButton.scss';
+import React from 'react';
-class DeleteButton extends Component {
+class DeleteButton extends React.Component {
render() {
return <input
className='ui-delete-button' type='button' value='&#x2716;'
diff --git a/src/settings/components/ui/delete-button.scss b/src/settings/components/ui/DeleteButton.scss
index 5932a72..5932a72 100644
--- a/src/settings/components/ui/delete-button.scss
+++ b/src/settings/components/ui/DeleteButton.scss
diff --git a/src/settings/components/ui/input.jsx b/src/settings/components/ui/Input.jsx
index e99dbc7..13a246b 100644
--- a/src/settings/components/ui/input.jsx
+++ b/src/settings/components/ui/Input.jsx
@@ -1,7 +1,8 @@
-import { h, Component } from 'preact';
-import './input.scss';
+import React from 'react';
+import PropTypes from 'prop-types';
+import './Input.scss';
-class Input extends Component {
+class Input extends React.Component {
renderText(props) {
let inputClassName = props.error ? 'input-error' : '';
@@ -49,4 +50,11 @@ class Input extends Component {
}
}
+Input.propTypes = {
+ type: PropTypes.string,
+ error: PropTypes.string,
+ label: PropTypes.string,
+ value: PropTypes.string,
+};
+
export default Input;
diff --git a/src/settings/components/ui/input.scss b/src/settings/components/ui/Input.scss
index ad4daf8..ad4daf8 100644
--- a/src/settings/components/ui/input.scss
+++ b/src/settings/components/ui/Input.scss