diff options
author | 2021-02-13 01:21:36 +0300 | |
---|---|---|
committer | 2021-02-13 01:21:36 +0300 | |
commit | 451c825c77cd68eafeb262eb1ea5cbfc21dce550 (patch) | |
tree | d6d7ed63dab13fd111f23265048cdfec00bdea08 /src/commonStyles.tsx | |
parent | Makes Authorize Helper Async (diff) |
Dynamically Show Discord OAuth Button
Dynamically displays an auth button in place of the submit button if
needed, and adds full authorization flow.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'src/commonStyles.tsx')
-rw-r--r-- | src/commonStyles.tsx | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/commonStyles.tsx b/src/commonStyles.tsx index 89a2746..eb3e319 100644 --- a/src/commonStyles.tsx +++ b/src/commonStyles.tsx @@ -1,4 +1,5 @@ import { css } from "@emotion/react"; +import colors from "./colors"; const selectable = css` -moz-user-select: text; @@ -50,6 +51,36 @@ const textInputs = css` border-radius: 8px; `; +const submitStyles = css` + text-align: right; + + button:disabled { + background-color: ${colors.greyple}; + cursor: default; + } + + button { + cursor: pointer; + + border: none; + border-radius: 8px; + + color: white; + font: inherit; + + background-color: ${colors.blurple}; + transition: background-color 300ms; + } + + button[type="submit"] { + padding: 0.55rem 4.25rem; + } + + button:enabled:hover { + background-color: ${colors.darkerBlurple}; + } +`; + export { selectable, @@ -57,4 +88,5 @@ export { hiddenInput, multiSelectInput, textInputs, + submitStyles }; |