Browse Source

fix(a11y): update element to login for github and google

Yash Joshi 4 years ago
parent
commit
86222634d1
2 changed files with 5 additions and 4 deletions
  1. 1 1
      dashboard/src/assets/GoogleIcon.tsx
  2. 4 3
      dashboard/src/main/auth/Login.tsx

+ 1 - 1
dashboard/src/assets/GoogleIcon.tsx

@@ -8,7 +8,7 @@ type StateType = {};
 export default class GHIcon extends Component<PropsType, StateType> {
 export default class GHIcon extends Component<PropsType, StateType> {
   render() {
   render() {
     return (
     return (
-      <Svg width="46px" height="46px" viewBox="0 0 46 46">
+      <Svg width="46px" height="46px" viewBox="0 0 46 46" {...this.props}>
         <title>btn_google_light_normal_ios</title>
         <title>btn_google_light_normal_ios</title>
         <desc>Created with Sketch.</desc>
         <desc>Created with Sketch.</desc>
         <defs>
         <defs>

+ 4 - 3
dashboard/src/main/auth/Login.tsx

@@ -146,7 +146,7 @@ export default class Login extends Component<PropsType, StateType> {
   };
   };
 
 
   renderGoogleSection = () => {
   renderGoogleSection = () => {
-    if (this.state.hasGoogle) {
+    if (true || this.state.hasGoogle) {
       return (
       return (
         <OAuthButton onClick={this.googleRedirect}>
         <OAuthButton onClick={this.googleRedirect}>
           <IconWrapper>
           <IconWrapper>
@@ -306,7 +306,7 @@ const IconWrapper = styled.div`
 
 
 const Icon = styled.img`
 const Icon = styled.img`
   height: 18px;
   height: 18px;
-  margin: 14px;
+  margin: 0 10px;
 `;
 `;
 
 
 const StyledGoogleIcon = styled(GoogleIcon)`
 const StyledGoogleIcon = styled(GoogleIcon)`
@@ -314,9 +314,10 @@ const StyledGoogleIcon = styled(GoogleIcon)`
   height: 38px;
   height: 38px;
 `;
 `;
 
 
-const OAuthButton = styled.div`
+const OAuthButton = styled.button`
   width: 200px;
   width: 200px;
   height: 30px;
   height: 30px;
+  border: 0;
   display: flex;
   display: flex;
   background: #ffffff;
   background: #ffffff;
   align-items: center;
   align-items: center;