Generic stake-position card: amount staked, lock-days remaining, accrued yield, eligibility badge (e.g., floor-protection eligibility), plus claim and unstake action buttons. Intended for any lock-and-yield staking contract.
The reward is frequently a different token from the stake, so it carries its own
yieldDecimals: formatting a 6-decimal reward with an 18-decimal stake token's
scale understates it by a factor of 1e12.
Web3.Ui.StakeCard.view []
{ amount = position.amount
, symbol = "TKN"
, decimals = 18
, startTimeSec = position.startTime
, lockDays = position.lockDays
, nowSec = nowSec
, yieldAccrued = position.yieldAccrued
, yieldSymbol = "PLS"
, yieldDecimals = 18
, badges = [ { active = position.floorEligible, label = "floor protected" } ]
, onClaimYield = Just (ClaimYield idx)
, onUnstake = Just (Unstake idx)
, unstakeLabel = "Unstake"
}Style: web3-stakecard, web3-stakecard__amount, web3-stakecard__lock,
web3-stakecard__yield, web3-stakecard__badge, web3-stakecard__actions,
web3-stakecard__action.
Render a stake-position card.