File size: 2,616 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// @flow
import theme from 'shared/theme';
import styled from 'styled-components';
import { zIndex } from 'src/components/globals';

export const Container = styled.div`
  display: grid;
  grid-gap: 16px;
  align-items: flex-end;
  padding: 16px 0;
  grid-template-columns: repeat(2, 1fr);
`;

export const A = styled.a`
  display: flex;
  grid-column: 1 / 2 span;
`;

export const SigninButton = styled.div`
  display: flex;
  flex: 1;
  z-index: ${zIndex.card + 1};
  flex-direction: flex-row;
  align-self: flex-start;
  align-items: center;
  justify-content: flex-start;
  color: ${theme.text.reverse};
  border-radius: 32px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  width: 100%;
  cursor: pointer;
  ${props => props.showAfter && `margin-top: 32px`};

  ${props =>
    props.showAfter &&
    `
    &:after {
        content: 'Previously signed in with';
        position: absolute;
        top: -32px;
        font-size: 14px;
        font-weight: 600;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        text-align: center;
        color: ${props.theme.text.alt};
      }
    `} svg {
    fill: currentColor !important;
  }
`;

export const Label = styled.span`
  display: flex;
  flex: 1 0 auto;
  justify-content: center;
  margin-top: -1px;
  margin-left: 8px;
  line-height: 2.45;
  word-break: keep-all;
  white-space: nowrap;
  color: currentColor;
`;

export const TwitterButton = styled(SigninButton)`
  background: ${props =>
    props.preferred ? props.theme.social.twitter.default : 'none'};
  color: ${props =>
    props.preferred ? '#fff' : props.theme.social.twitter.default};

  &:after {
    color: ${theme.social.twitter.default};
  }
`;

export const FacebookButton = styled(SigninButton)`
  background: ${props =>
    props.preferred ? props.theme.social.facebook.default : 'none'};
  color: ${props =>
    props.preferred ? '#fff' : props.theme.social.facebook.default};

  &:after {
    color: ${theme.social.facebook.default};
  }
`;

export const GoogleButton = styled(SigninButton)`
  background: ${props =>
    props.preferred ? props.theme.social.google.default : 'none'};
  color: ${props =>
    props.preferred ? '#fff' : props.theme.social.google.default};

  &:after {
    color: ${theme.social.google.default};
  }
`;

export const GithubButton = styled(SigninButton)`
  background: ${props =>
    props.preferred ? props.theme.social.github.default : 'none'};
  color: ${props =>
    props.preferred ? '#fff' : props.theme.social.github.default};

  &:after {
    color: ${theme.text.default};
  }
`;