Skip to content

Commit

Permalink
Fix footer styling
Browse files Browse the repository at this point in the history
  • Loading branch information
FrederikBolding committed Aug 15, 2024
1 parent 5bd74fd commit 8b396dd
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 24 deletions.
6 changes: 4 additions & 2 deletions ui/components/app/snaps/snap-ui-renderer/index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.snap-ui-renderer {
&__content {
margin-bottom: 0 !important;
}

&__container {
& > div:first-child {
padding: 16px;
Expand Down Expand Up @@ -42,11 +46,9 @@
}

&__footer {
grid-area: footer;
margin-top: auto;

&-centered {
grid-area: footer;
margin-top: auto;

& button {
Expand Down
45 changes: 23 additions & 22 deletions ui/pages/confirmations/confirmation/confirmation.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,14 +500,21 @@ export default function ConfirmationPage({
</button>
</div>
)}
{isSnapCustomUIDialog ? (
<>
<div className="confirmation-page__content">
{isSnapCustomUIDialog && (
<Box width={BlockSize.Screen}>
<SnapAuthorshipHeader
snapId={pendingConfirmation?.origin}
onCancel={handleSnapDialogCancel}
/>
</Box>
)}
{templatedValues.networkDisplay ? (
<Box justifyContent="center" marginTop={2}>
<NetworkDisplay />
</Box>
) : null}
{isSnapCustomUIDialog ? (
<SnapUIRenderer
snapId={pendingConfirmation?.origin}
interfaceId={pendingConfirmation?.requestData.id}
Expand All @@ -521,27 +528,21 @@ export default function ConfirmationPage({
onCancel={handleSnapDialogCancel}
useFooter={isSnapDefaultDialog}
/>
</>
) : (
<div className="confirmation-page__content">
{templatedValues.networkDisplay ? (
<Box justifyContent="center" marginTop={2}>
<NetworkDisplay />
</Box>
) : null}
) : (
<MetaMaskTemplateRenderer sections={templatedValues.content} />
{showWarningModal && (
<ConfirmationWarningModal
onSubmit={async () => {
const res = await templatedValues.onSubmit();
await handleSubmitResult(res);
setShowWarningModal(false);
}}
onCancel={templatedValues.onCancel}
/>
)}
</div>
)}
)}

{showWarningModal && (
<ConfirmationWarningModal
onSubmit={async () => {
const res = await templatedValues.onSubmit();
await handleSubmitResult(res);
setShowWarningModal(false);
}}
onCancel={templatedValues.onCancel}
/>
)}
</div>
{!isSnapDefaultDialog && (
<ConfirmationFooter
alerts={
Expand Down

0 comments on commit 8b396dd

Please sign in to comment.