diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2020-09-21 16:08:44 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2020-09-21 22:07:55 +0900 |
commit | c28ae6b82860693b8e6b012a939fb8a3dd320e23 (patch) | |
tree | 2f690587d6c3b83453f52b070151a4c5996028e8 /src/settings/components/ui/AddButton.tsx | |
parent | 063ceb215f858a8e2a5bde85d8f9ca24240894c6 (diff) |
Introduce styled-components on settings ui
Diffstat (limited to 'src/settings/components/ui/AddButton.tsx')
-rw-r--r-- | src/settings/components/ui/AddButton.tsx | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/settings/components/ui/AddButton.tsx b/src/settings/components/ui/AddButton.tsx index c15a732..8cf4300 100644 --- a/src/settings/components/ui/AddButton.tsx +++ b/src/settings/components/ui/AddButton.tsx @@ -1,19 +1,24 @@ -import "./AddButton.scss"; import React from "react"; +import styled from "styled-components"; -type Props = React.AllHTMLAttributes<HTMLInputElement>; +const Button = styled.input` + border: none; + padding: 4; + display: inline; + background: none; + font-weight: bold; + color: green; + cursor: pointer; -class AddButton extends React.Component<Props> { - render() { - return ( - <input - className="ui-add-button" - type="button" - value="✚" - {...this.props} - /> - ); + &:hover { + color: darkgreen; } -} +`; + +type Props = React.InputHTMLAttributes<HTMLInputElement>; + +const AddButton: React.FC<Props> = (props) => ( + <Button type="button" value="✚" {...props} /> +); export default AddButton; |