-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from celo-tools/granda
Add Granda Mento Support
- Loading branch information
Showing
56 changed files
with
2,549 additions
and
991 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
node_modules | ||
src/vendor | ||
dist | ||
webpack.config.js | ||
jest.config.js | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,9 @@ | |
/.pnp | ||
.pnp.js | ||
|
||
# Typescript build | ||
tsconfig.tsbuildinfo | ||
|
||
# testing | ||
/coverage | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { memo } from 'react' | ||
|
||
interface Props { | ||
width?: string | number | ||
height?: string | number | ||
direction: 'n' | 'e' | 's' | 'w' | ||
color?: string | ||
classes?: string | ||
} | ||
|
||
function _ChevronIcon({ width, height, direction, color, classes }: Props) { | ||
let className: string | ||
switch (direction) { | ||
case 'n': | ||
className = 'rotate-180' | ||
break | ||
case 'e': | ||
className = 'rotate-270' | ||
break | ||
case 's': | ||
className = '' | ||
break | ||
case 'w': | ||
className = 'rotate-90' | ||
break | ||
default: | ||
throw new Error(`Invalid chevron direction ${direction}`) | ||
} | ||
|
||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width={width} | ||
height={height} | ||
viewBox="0 0 14 8" | ||
className={`${className} ${classes}`} | ||
> | ||
<path | ||
d="M1 1l6 6 6-6" | ||
strokeWidth="2" | ||
stroke={color || '#2E3338'} | ||
fill="none" | ||
fillRule="evenodd" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
</svg> | ||
) | ||
} | ||
|
||
export const ChevronIcon = memo(_ChevronIcon) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { toast } from 'react-toastify' | ||
import { TextLink } from 'src/components/buttons/TextLink' | ||
|
||
export function toastToYourSuccess(msg: string, txHash: string, blockscoutUrl: string) { | ||
toast.success(<TxSuccessToast msg={msg} txHash={txHash} blockscoutUrl={blockscoutUrl} />, { | ||
autoClose: 15000, | ||
}) | ||
} | ||
|
||
export function TxSuccessToast({ | ||
msg, | ||
txHash, | ||
blockscoutUrl, | ||
}: { | ||
msg: string | ||
txHash: string | ||
blockscoutUrl: string | ||
}) { | ||
return ( | ||
<div> | ||
{msg + ' '} | ||
<TextLink className="underline" href={`${blockscoutUrl}/tx/${txHash}`}> | ||
See Details | ||
</TextLink> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.spinner { | ||
display: inline-block; | ||
position: relative; | ||
width: 80px; | ||
height: 80px; | ||
opacity: 0.8; | ||
} | ||
|
||
.spinner div { | ||
box-sizing: border-box; | ||
display: block; | ||
position: absolute; | ||
width: 64px; | ||
height: 64px; | ||
margin: 8px; | ||
border: 8px solid #2e3338; | ||
border-radius: 50%; | ||
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite; | ||
border-color: #2e3338 transparent transparent transparent; | ||
} | ||
|
||
.spinner div:nth-of-type(1) { | ||
animation-delay: -0.45s; | ||
} | ||
.spinner div:nth-of-type(2) { | ||
animation-delay: -0.3s; | ||
} | ||
.spinner div:nth-of-type(3) { | ||
animation-delay: -0.15s; | ||
} | ||
|
||
@keyframes lds-ring { | ||
0% { | ||
transform: rotate(0deg); | ||
} | ||
100% { | ||
transform: rotate(360deg); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { memo } from 'react' | ||
import styles from 'src/components/animation/Spinner.module.css' | ||
|
||
// From https://loading.io/css/ | ||
function _Spinner() { | ||
return ( | ||
<div className={styles.spinner}> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
</div> | ||
) | ||
} | ||
|
||
export const Spinner = memo(_Spinner) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { IconButton, IconButtonProps } from 'src/components/buttons/IconButton' | ||
import LeftArrow from 'src/images/icons/arrow-left-circle.svg' | ||
|
||
export function BackButton(props: IconButtonProps) { | ||
return <IconButton imgSrc={LeftArrow} title="Go back" {...props} /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { IconButton, IconButtonProps } from 'src/components/buttons/IconButton' | ||
import RepeatArrow from 'src/images/icons/arrow-repeat.svg' | ||
|
||
export function RefreshButton(props: IconButtonProps) { | ||
return <IconButton imgSrc={RepeatArrow} title="Refresh" {...props} /> | ||
} |
Oops, something went wrong.
e82f8cf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: