Skip to content

Commit

Permalink
style: add hourglass
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-1979 committed Dec 8, 2024
1 parent eadedc4 commit 6bc1d9b
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/snap/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/polkagate/snap.git"
},
"source": {
"shasum": "RLbpFL70qJQgl5MUKNoO1M87+mp1UO35JBWBQkFuRCE=",
"shasum": "GU6RLcGmf1Uq1//QEReWytGF37ZyMct/wq4kntcQ+VY=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
51 changes: 51 additions & 0 deletions packages/snap/src/ui/image/icons/hourglass.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion packages/snap/src/ui/image/icons/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ export { default as book } from './book.svg'
export { default as webSite } from './webSite.svg'
export { default as email } from './email.svg'
export { default as youtube } from './youtube.svg'
export { default as success } from './success.svg'
export { default as success } from './success.svg'
export { default as hourglass } from './hourglass.svg'
14 changes: 6 additions & 8 deletions packages/snap/src/ui/showSpinner.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Box, Icon, Spinner, Text } from "@metamask/snaps-sdk/jsx";
import { Box, Icon, Image, Spinner, Text } from "@metamask/snaps-sdk/jsx";
import { hourglass } from "./image/icons";
/**
* Show an spinner while processing.
*
Expand All @@ -19,14 +20,11 @@ export const ui = (label?: string) => {

return (
<Box direction="vertical" alignment="center" center>
<Image src={hourglass} />
<Text alignment="center">
{label || 'Processing, Please Wait!'}
</Text>
<Spinner />
<Box direction="horizontal" alignment="center" center>
<Icon name="loading" size="md" color='muted'/>
<Text alignment="center">
{label || 'Processing, Please Wait!'}
</Text>
</Box>
</Box>

);
};

0 comments on commit 6bc1d9b

Please sign in to comment.