diff options
| author | Jacky Zhao <[email protected]> | 2021-03-06 17:57:24 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-03-06 17:57:24 -0800 |
| commit | 5dd02b5c2acd7a4c408ce9ffa1d95e208d20bbc8 (patch) | |
| tree | 5a09bea364331dd0f41510153924065b815b702e /frontend/src/components/Common/Button.js | |
| parent | fix(typo): public api docs endpoint (diff) | |
| parent | fix password modal (diff) | |
| download | ctrl-v-5dd02b5c2acd7a4c408ce9ffa1d95e208d20bbc8.tar.xz ctrl-v-5dd02b5c2acd7a4c408ce9ffa1d95e208d20bbc8.zip | |
Merge pull request #70 from jackyzha0/visual-overhaul
Diffstat (limited to 'frontend/src/components/Common/Button.js')
| -rw-r--r-- | frontend/src/components/Common/Button.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/frontend/src/components/Common/Button.js b/frontend/src/components/Common/Button.js new file mode 100644 index 0000000..59e148b --- /dev/null +++ b/frontend/src/components/Common/Button.js @@ -0,0 +1,32 @@ +import styled, {css} from 'styled-components' +import {Border, ButtonLike, DropShadow, Rounded} from "./mixins"; + +const Base = css` + ${DropShadow} + ${Rounded} + ${ButtonLike} + margin-right: 2em; + height: calc(16px + 1.6em); + cursor: pointer; +` + +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`${Secondary}` : css`${Primary}` } +` + +export const SubmitButton = styled.input` + ${Primary} +`
\ No newline at end of file |