aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/Form
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/Form')
-rw-r--r--frontend/src/components/Form/Button.js30
-rw-r--r--frontend/src/components/Form/Input.js1
-rw-r--r--frontend/src/components/Form/index.js0
-rw-r--r--frontend/src/components/Form/mixins.js2
4 files changed, 31 insertions, 2 deletions
diff --git a/frontend/src/components/Form/Button.js b/frontend/src/components/Form/Button.js
index e69de29..7396ca1 100644
--- a/frontend/src/components/Form/Button.js
+++ b/frontend/src/components/Form/Button.js
@@ -0,0 +1,30 @@
+import styled, {css} from 'styled-components'
+import {Border, ButtonLike, DropShadow, Rounded} from "./mixins";
+
+const Base = css`
+ ${DropShadow}
+ ${Rounded}
+ ${ButtonLike}
+ margin-right: 2em;
+`
+
+const Primary = css`
+ ${Base};
+ border: none;
+ color: ${p => p.theme.colors.background};
+ background-color: ${p => p.theme.colors.text};
+`
+const Secondary = css`
+ ${Base};
+ ${Border};
+ color: ${p => p.theme.colors.text};
+ background-color: ${p => p.theme.colors.background};
+`
+
+export const Button = styled.button`
+ ${p => p.secondary ? css`${Primary}` : css`${Secondary}` }
+`
+
+export const SubmitButton = styled.input`
+ ${Primary}
+` \ No newline at end of file
diff --git a/frontend/src/components/Form/Input.js b/frontend/src/components/Form/Input.js
index 4dbc002..e000cfb 100644
--- a/frontend/src/components/Form/Input.js
+++ b/frontend/src/components/Form/Input.js
@@ -1,4 +1,3 @@
-import React from "react";
import styled from 'styled-components'
import {Border, DropShadow, InputLike, Rounded} from "./mixins";
diff --git a/frontend/src/components/Form/index.js b/frontend/src/components/Form/index.js
deleted file mode 100644
index e69de29..0000000
--- a/frontend/src/components/Form/index.js
+++ /dev/null
diff --git a/frontend/src/components/Form/mixins.js b/frontend/src/components/Form/mixins.js
index 55d6259..38ea394 100644
--- a/frontend/src/components/Form/mixins.js
+++ b/frontend/src/components/Form/mixins.js
@@ -24,7 +24,7 @@ export const InputLike = css`
export const ButtonLike = css`
font-family: 'JetBrains Mono', serif;
font-weight: 700;
- padding: 0.8em 2em;
+ padding: 0.6em 1.5em;
margin: 2em 0;
outline: 0;
` \ No newline at end of file