Skip to content

Commit 7b16009

Browse files
permaweb
1 parent 6be9df2 commit 7b16009

2 files changed

Lines changed: 33 additions & 1 deletion

File tree

src/app/home/AssetRow/AssetRow.module.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,28 @@ body.modal-open .tooltip {
236236
body.modal-open .tooltip {
237237
z-index: 1 !important;
238238
}
239+
240+
/* AO airdrop banner */
241+
242+
.specialStyling {
243+
position: relative;
244+
}
245+
246+
.specialStyling .assetRow {
247+
border: 3px solid var(--primary-palatinate-blue);
248+
padding: 9px 13px;
249+
}
250+
251+
.aoLabel {
252+
position: absolute;
253+
top: 0px;
254+
right: 0px;
255+
background-color: var(--primary-palatinate-blue);
256+
color: #ffffff;
257+
padding: 2px 6px;
258+
font-size: 7px;
259+
font-weight: bold;
260+
border-radius: 4px;
261+
z-index: 10;
262+
pointer-events: none;
263+
}

src/app/home/AssetRow/AssetRow.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ const AssetRow: React.FC<AssetRowProps> = ({ asset, mode }) => {
3434
// Check if the token is deprecated
3535
const isDeprecated = DEPRECATED_TOKENS.includes(asset.cleanTicker);
3636

37+
// Check if this should have special styling (WAR in lend mode)
38+
const hasSpecialStyling =
39+
asset.ticker.toUpperCase() === "WAR" && mode === "lend";
40+
3741
const actionDo = mode === "lend" ? "Supply" : "Borrow";
3842
const actionReverse = mode === "lend" ? "Withdraw" : "Repay";
3943

@@ -71,10 +75,13 @@ const AssetRow: React.FC<AssetRowProps> = ({ asset, mode }) => {
7175
}, [asset, currentBalance]);
7276

7377
// Add class to hide tooltips when modal is open
74-
const wrapperClasses = `${styles.assetRowWrapper} ${modal.modalType ? "modal-open" : ""}`;
78+
const wrapperClasses = `${styles.assetRowWrapper} ${modal.modalType ? "modal-open" : ""} ${hasSpecialStyling ? styles.specialStyling : ""}`;
7579

7680
return (
7781
<div className={wrapperClasses}>
82+
{hasSpecialStyling && (
83+
<div className={styles.aoLabel}>Continues earning AO while lent</div>
84+
)}
7885
<Link href={`/${asset.cleanTicker}`} className={styles.assetRow}>
7986
<div className={styles.assetInfo}>
8087
<div className={styles.iconWrapper}>

0 commit comments

Comments
 (0)