diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-12-22 11:10:36 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-22 11:10:36 +0900 |
commit | b1a6f374dca078dee2406ebe049715b826e37ca2 (patch) | |
tree | 5367c48648e2018f55f12d847baba94559e10040 /src/settings/components/ui | |
parent | b2dcdedad729ff7087867da50e20578f9fc8fb29 (diff) | |
parent | da72c2ddd916d79d134662e3985b53a4ac78af7a (diff) |
Merge pull request #690 from ueokande/eslint-and-prettier
Eslint and prettier
Diffstat (limited to 'src/settings/components/ui')
-rw-r--r-- | src/settings/components/ui/AddButton.tsx | 3 | ||||
-rw-r--r-- | src/settings/components/ui/DeleteButton.tsx | 3 | ||||
-rw-r--r-- | src/settings/components/ui/Input.tsx | 14 |
3 files changed, 9 insertions, 11 deletions
diff --git a/src/settings/components/ui/AddButton.tsx b/src/settings/components/ui/AddButton.tsx index 0577068..bb76d08 100644 --- a/src/settings/components/ui/AddButton.tsx +++ b/src/settings/components/ui/AddButton.tsx @@ -1,8 +1,7 @@ import './AddButton.scss'; import React from 'react'; -interface Props extends React.AllHTMLAttributes<HTMLInputElement> { -} +type Props = React.AllHTMLAttributes<HTMLInputElement>; class AddButton extends React.Component<Props> { render() { diff --git a/src/settings/components/ui/DeleteButton.tsx b/src/settings/components/ui/DeleteButton.tsx index f0ef6c9..e666426 100644 --- a/src/settings/components/ui/DeleteButton.tsx +++ b/src/settings/components/ui/DeleteButton.tsx @@ -1,8 +1,7 @@ import './DeleteButton.scss'; import React from 'react'; -interface Props extends React.AllHTMLAttributes<HTMLInputElement> { -} +type Props = React.AllHTMLAttributes<HTMLInputElement>; class DeleteButton extends React.Component<Props> { render() { diff --git a/src/settings/components/ui/Input.tsx b/src/settings/components/ui/Input.tsx index b7593b9..69c14b3 100644 --- a/src/settings/components/ui/Input.tsx +++ b/src/settings/components/ui/Input.tsx @@ -13,8 +13,8 @@ interface Props extends React.AllHTMLAttributes<HTMLElement> { class Input extends React.Component<Props> { renderText(props: Props) { - let inputClassName = props.error ? 'input-error' : ''; - let pp = { ...props }; + const inputClassName = props.error ? 'input-error' : ''; + const pp = { ...props }; delete pp.onValueChange; return <div className='settings-ui-input'> <label htmlFor={props.id}>{ props.label }</label> @@ -26,8 +26,8 @@ class Input extends React.Component<Props> { } renderRadio(props: Props) { - let inputClassName = props.error ? 'input-error' : ''; - let pp = { ...props }; + const inputClassName = props.error ? 'input-error' : ''; + const pp = { ...props }; delete pp.onValueChange; return <div className='settings-ui-input'> <label> @@ -41,8 +41,8 @@ class Input extends React.Component<Props> { } renderTextArea(props: Props) { - let inputClassName = props.error ? 'input-error' : ''; - let pp = { ...props }; + const inputClassName = props.error ? 'input-error' : ''; + const pp = { ...props }; delete pp.onValueChange; return <div className='settings-ui-input'> <label @@ -57,7 +57,7 @@ class Input extends React.Component<Props> { } render() { - let { type } = this.props; + const { type } = this.props; switch (this.props.type) { case 'text': |