Skip to content

Commit

Permalink
ABI update: ContractBorrowerOperations
Browse files Browse the repository at this point in the history
  • Loading branch information
bpierre committed Apr 13, 2024
1 parent ac99d32 commit 47eceff
Show file tree
Hide file tree
Showing 3 changed files with 400 additions and 154 deletions.
59 changes: 58 additions & 1 deletion frontend/src/app/contracts/ContractAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ export function ContractAction({
onFillExample,
onSubmit,
title,
error,
}: {
children?: ReactNode;
onFillExample?: () => void;
onSubmit?: () => void;
title: string;
error: {
name: string;
message: string;
} | null;
}) {
return (
<section
Expand Down Expand Up @@ -48,7 +53,7 @@ export function ContractAction({
)}
</div>
<form
onSubmit={e => {
onSubmit={(e) => {
e.preventDefault();
onSubmit?.();
}}
Expand All @@ -69,6 +74,58 @@ export function ContractAction({
>
<Button label={title} />
</div>
{error && (
<div
className={css({
paddingTop: 32,
})}
>
<div
className={css({
position: "relative",
})}
>
<div
className={css({
position: "absolute",
zIndex: 1,
inset: 0,
background: "negative",
opacity: 0.8,
})}
/>
<div
className={css({
position: "relative",
zIndex: 2,
overflow: "auto",
padding: 32,
display: "flex",
flexDirection: "column",
gap: 16,
color: "white",
fontSize: 14,
})}
>
<p
className={css({
fontSize: 16,
whiteSpace: "nowrap",
})}
>
Error: {error.name}
</p>
<div
className={css({
whiteSpace: "pre-wrap",
})}
>
{error.message}
</div>
</div>
</div>
</div>
)}
</form>
</section>
);
Expand Down
Loading

0 comments on commit 47eceff

Please sign in to comment.