Skip to content

Commit

Permalink
feat(airdrop): destination
Browse files Browse the repository at this point in the history
  • Loading branch information
JayJay1024 committed Jan 18, 2022
1 parent da99229 commit 7d6d9f0
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/component/ClaimAirdrop/SubComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const SnapshotDataSection = ({
);

export const DestinationSection = ({
onAddressChange=(address)=>console.log(address),
onAddressChange=(e)=>console.log(e.target.value),
isValidAddress=true,
isNothingToClaim=false,
isClaimed=false,
Expand Down Expand Up @@ -133,11 +133,11 @@ export const DestinationSection = ({
return (
<div className={styles.destinationSection}>
<h5>Destination</h5>
<input onChange={onAddressChange} />
<input placeholder='Please enter your Crab Smart Address which starts with 0x' onChange={onAddressChange} />
{isValidAddress ? (
<span>Please enter your Crab Smart Address to claim token CRAB, learn more about Crab Smart Address, please refer <a href='#'>here</a>.</span>
) : (
<span>Please enter a valid Crab Smart Address, learn more about Crab Smart Address, please refer <a href='#'>here</a>.</span>
<span className={styles.warning}>Please enter a valid Crab Smart Address, learn more about Crab Smart Address, please refer <a href='#'>here</a>.</span>
)}
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/component/ClaimAirdrop/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const ClaimAirdrop: React.FC<Props> = ({ className }) => {
>
<Space direction='vertical' size='middle' style={{ width: '100%' }}>
<SnapshotDataSection />
<DestinationSection isNothingToClaim={true} />
<DestinationSection isValidAddress={false} />
</Space>
</ComfirmModal>
<LoadingModal
Expand Down
35 changes: 35 additions & 0 deletions src/component/ClaimAirdrop/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,45 @@
}

.destinationSection {
display: flex;
flex-direction: column;

>p {
font-weight: bold;
font-size: small;
margin: 0;
text-align: center;
}

>input {
border: 1px solid #CCCCCC;
border-radius: 10px;
height: 36px;
padding: 0 12px;
margin-bottom: 6px;
box-shadow: inset 0 0 6px #CCCCCC;

&:hover {
box-shadow: 0 0 2px rgba(228, 26, 112, 0.9);
border: 1px solid rgba(228, 26, 112, 0.9);
}

&:focus-visible {
outline-color: rgba(228, 26, 112, 0.9);
}
}

>span {
>a {
text-decoration: underline;
}

&.warning {
color: #FF0000;

>a {
color: #000000;
}
}
}
}

0 comments on commit 7d6d9f0

Please sign in to comment.