-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Polish Safenet UI for Security Checks (#4486)
## What it solves Designs for the Safenet UI included changes to the security check UI elements; this PR implements those styling changes. ## How this PR fixes it A new `GradientBoxSafenet` UI element was created that wraps an inner element in a box. This was done because implementing gradients on borders is kind of annoying, and so having a component to abstract this away was nice. UI was changed in both the TX details view in the queue, but also for the signing and execution flow. ## Screenshots ### Transaction Details ![image](https://github.com/user-attachments/assets/3e38cb68-1bde-48a6-a2e5-324e84af6af6) ### Sign and Execute Flow ![image](https://github.com/user-attachments/assets/554ea7d6-c626-4550-b924-268764f9dad7) ### Verification Link ![image](https://github.com/user-attachments/assets/5dc3f587-8540-45d7-a6f1-efb4549fa330)
- Loading branch information
Showing
6 changed files
with
147 additions
and
51 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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { Box, SvgIcon, Typography } from '@mui/material' | ||
import SafenetIcon from '@/public/images/safenet.svg' | ||
import { type CSSProperties, type ReactNode } from 'react' | ||
|
||
const GradientBoxSafenet = ({ | ||
heading, | ||
children, | ||
className, | ||
style, | ||
}: { | ||
heading?: string | ||
children?: ReactNode | ||
className?: string | ||
style?: CSSProperties | ||
}) => { | ||
return ( | ||
<Box | ||
className={className} | ||
style={{ | ||
background: 'linear-gradient(90deg, #32f970 0%, #eed509 100%)', | ||
borderRadius: 'calc(var(--space-1) - 1px)', | ||
display: 'flex', | ||
alignItems: 'stretch', | ||
flexDirection: 'column', | ||
justifyContent: 'space-between', | ||
...style, | ||
}} | ||
> | ||
<Box | ||
style={{ | ||
color: 'var(--color-static-main)', | ||
padding: 'calc(var(--space-1) / 2) var(--space-1)', | ||
display: 'flex', | ||
flexDirection: 'row', | ||
justifyContent: 'space-between', | ||
alignItems: 'center', | ||
}} | ||
> | ||
<SvgIcon component={SafenetIcon} inheritViewBox fontSize="small" /> | ||
<Typography variant="h5" fontSize="small"> | ||
{heading ?? 'Safenet'} | ||
</Typography> | ||
</Box> | ||
<Box | ||
className="GradientBoxSafenet-content" | ||
style={{ | ||
background: 'var(--color-background-paper)', | ||
borderRadius: '0 0 var(--space-1) var(--space-1)', | ||
margin: '1px', | ||
}} | ||
> | ||
{children} | ||
</Box> | ||
</Box> | ||
) | ||
} | ||
|
||
export default GradientBoxSafenet |
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
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