From be900aa25ca205c467dcbbab9c284ef680441996 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Mon, 29 Apr 2019 15:27:23 +0900 Subject: Clean settings components --- src/settings/components/ui/AddButton.jsx | 12 +++++++ src/settings/components/ui/AddButton.scss | 13 +++++++ src/settings/components/ui/DeleteButton.jsx | 12 +++++++ src/settings/components/ui/DeleteButton.scss | 13 +++++++ src/settings/components/ui/Input.jsx | 52 +++++++++++++++++++++++++++ src/settings/components/ui/Input.scss | 29 +++++++++++++++ src/settings/components/ui/add-button.jsx | 12 ------- src/settings/components/ui/add-button.scss | 13 ------- src/settings/components/ui/delete-button.jsx | 12 ------- src/settings/components/ui/delete-button.scss | 13 ------- src/settings/components/ui/input.jsx | 52 --------------------------- src/settings/components/ui/input.scss | 29 --------------- 12 files changed, 131 insertions(+), 131 deletions(-) create mode 100644 src/settings/components/ui/AddButton.jsx create mode 100644 src/settings/components/ui/AddButton.scss create mode 100644 src/settings/components/ui/DeleteButton.jsx create mode 100644 src/settings/components/ui/DeleteButton.scss create mode 100644 src/settings/components/ui/Input.jsx create mode 100644 src/settings/components/ui/Input.scss delete mode 100644 src/settings/components/ui/add-button.jsx delete mode 100644 src/settings/components/ui/add-button.scss delete mode 100644 src/settings/components/ui/delete-button.jsx delete mode 100644 src/settings/components/ui/delete-button.scss delete mode 100644 src/settings/components/ui/input.jsx delete mode 100644 src/settings/components/ui/input.scss (limited to 'src/settings/components/ui') diff --git a/src/settings/components/ui/AddButton.jsx b/src/settings/components/ui/AddButton.jsx new file mode 100644 index 0000000..185a03b --- /dev/null +++ b/src/settings/components/ui/AddButton.jsx @@ -0,0 +1,12 @@ +import './AddButton.scss'; +import React from 'react'; + +class AddButton extends React.Component { + render() { + return ; + } +} + +export default AddButton; diff --git a/src/settings/components/ui/AddButton.scss b/src/settings/components/ui/AddButton.scss new file mode 100644 index 0000000..beb5688 --- /dev/null +++ b/src/settings/components/ui/AddButton.scss @@ -0,0 +1,13 @@ +.ui-add-button { + border: none; + padding: 4; + display: inline; + background: none; + font-weight: bold; + color: green; + cursor: pointer; + + &:hover { + color: darkgreen; + } +} diff --git a/src/settings/components/ui/DeleteButton.jsx b/src/settings/components/ui/DeleteButton.jsx new file mode 100644 index 0000000..75811cd --- /dev/null +++ b/src/settings/components/ui/DeleteButton.jsx @@ -0,0 +1,12 @@ +import './DeleteButton.scss'; +import React from 'react'; + +class DeleteButton extends React.Component { + render() { + return ; + } +} + +export default DeleteButton; diff --git a/src/settings/components/ui/DeleteButton.scss b/src/settings/components/ui/DeleteButton.scss new file mode 100644 index 0000000..5932a72 --- /dev/null +++ b/src/settings/components/ui/DeleteButton.scss @@ -0,0 +1,13 @@ + +.ui-delete-button { + border: none; + padding: 4; + display: inline; + background: none; + color: red; + cursor: pointer; + + &:hover { + color: darkred; + } +} diff --git a/src/settings/components/ui/Input.jsx b/src/settings/components/ui/Input.jsx new file mode 100644 index 0000000..d090f5b --- /dev/null +++ b/src/settings/components/ui/Input.jsx @@ -0,0 +1,52 @@ +import React from 'react'; +import './Input.scss'; + +class Input extends React.Component { + + renderText(props) { + let inputClassName = props.error ? 'input-error' : ''; + return
+ + +
; + } + + renderRadio(props) { + let inputClassName = props.error ? 'input-error' : ''; + return
+ +
; + } + + renderTextArea(props) { + let inputClassName = props.error ? 'input-error' : ''; + return
+ +