-
Notifications
You must be signed in to change notification settings - Fork 478
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 #1136 from chainapsis/delivan/keplr-313
Update the signing EVM transaction UI
- Loading branch information
Showing
6 changed files
with
353 additions
and
75 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
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
57 changes: 57 additions & 0 deletions
57
apps/extension/src/pages/sign/components/eth-tx/render/tx-base.tsx
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,57 @@ | ||
import React, { FunctionComponent } from "react"; | ||
import { useTheme } from "styled-components"; | ||
import { Box } from "../../../../../components/box"; | ||
import { Column, Columns } from "../../../../../components/column"; | ||
import { Gutter } from "../../../../../components/gutter"; | ||
import { Body3, H5 } from "../../../../../components/typography"; | ||
import { ColorPalette } from "../../../../../styles"; | ||
|
||
export const EthTxBase: FunctionComponent<{ | ||
icon: React.ReactElement; | ||
title: string | React.ReactElement; | ||
content: string | React.ReactElement; | ||
}> = ({ icon, title, content }) => { | ||
const theme = useTheme(); | ||
|
||
return ( | ||
<Columns sum={1}> | ||
<Box | ||
width="2.75rem" | ||
minWidth="2.75rem" | ||
height="2.75rem" | ||
alignX="center" | ||
alignY="center" | ||
> | ||
{icon} | ||
</Box> | ||
|
||
<Gutter size="0.5rem" /> | ||
|
||
<Column weight={1}> | ||
<Box minHeight="3rem" alignY="center"> | ||
<H5 | ||
color={ | ||
theme.mode === "light" | ||
? ColorPalette["gray-500"] | ||
: ColorPalette["gray-10"] | ||
} | ||
> | ||
{title} | ||
</H5> | ||
|
||
<Gutter size="0.75rem" /> | ||
|
||
<Body3 | ||
color={ | ||
theme.mode === "light" | ||
? ColorPalette["gray-300"] | ||
: ColorPalette["gray-200"] | ||
} | ||
> | ||
{content} | ||
</Body3> | ||
</Box> | ||
</Column> | ||
</Columns> | ||
); | ||
}; |
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
Oops, something went wrong.