Skip to content

Commit

Permalink
feat: log in github btn
Browse files Browse the repository at this point in the history
  • Loading branch information
JayJay1024 committed Jan 18, 2022
1 parent 4ff4c29 commit 97a80d2
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Crab has two endpoints available for users to connect to: one for HTTPS and one

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import ClaimAirdrop from '../../../src/component/ClaimAirdrop';

<Tabs
defaultValue="wss"
Expand Down Expand Up @@ -46,3 +47,5 @@ wss://crab-rpc.darwinia.network
## Get Tokens

To promote Crab Network to developers, meanwhile to make it easier for developers to start building on Crab, we launched a developer airdrop program. The developer airdrop program will distribute 200,000 CRAB, any Github account registered before December 30, 2021 will have the qualification to claim the airdrop.

<ClaimAirdrop />
23 changes: 23 additions & 0 deletions src/component/ClaimAirdrop/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React, { useRef, useState } from 'react';
import clsx from 'clsx';
import styles from './styles.module.scss';

type Props = {
className?: string;
}

const ClaimAirdrop: React.FC<Props> = ({ className }) => {
const handleClickLoginWithGithub = (e: Event) => {
e.preventDefault();
}

return (
<div className={clsx(className)}>
<button className={clsx(styles.btnLoginWithGihub)} onClick={handleClickLoginWithGithub}>
<span>Log in with Github</span>
</button>
</div>
);
};

export default React.memo<Props>(ClaimAirdrop);
33 changes: 33 additions & 0 deletions src/component/ClaimAirdrop/styles.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
%-btn-base {
transition: all 0.3s;
opacity: 1;

&:hover {
opacity: 0.8;
}

&:active {
opacity: 0.6;
}
}

.btnLoginWithGihub {
@extend %-btn-base;
padding: 8px 12px;
background: transparent;
border-radius: 10px;
border: 2px solid rgba(228, 26, 112, 0.9);

&:hover {
box-shadow: 0 0 4px rgba(228, 26, 112, 0.9);
}

&:active {
box-shadow: 0 0 8px rgba(228, 26, 112, 0.9);
}

>span {
font-weight: bold;
color: rgba(228, 26, 112, 0.9);
}
}

0 comments on commit 97a80d2

Please sign in to comment.