quietgarden/elm-web3-ui/2.0.0

Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/quietgarden/elm-web3-ui is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with tag 2.0.0 found (1 same-name repos checked); no cached copy. Use another version.

Details

Web3.Ui.Transaction

Transaction lifecycle UI components.

Pattern-match on Tx.Status to render appropriate UI without missing any state.

-- Status badge with modifier class:
Web3.Ui.Transaction.statusBadge [] tx.status


-- Action button disabled while in-flight:
Web3.Ui.Transaction.actionButton []
    { label = "Buy", pendingLabel = "Buying…", onPress = SubmitBuy }
    tx.status


-- Clickable tx hash link:
Web3.Ui.Transaction.txHashLink []
    { explorerUrl = "https://etherscan.io/tx/" }
    hash


-- Hash link extracted from status (Nothing when no hash available):
-- Pass Nothing for explorerUrl in local dev — renders a plain span instead of a dead link.
Web3.Ui.Transaction.statusHashLink []
    { explorerUrl = Just "https://etherscan.io/tx/" }
    tx.status


-- Confirmed receipt display:
Web3.Ui.Transaction.receiptView []
    { explorerUrl = "https://etherscan.io/tx/" }
    receipt
statusBadge : List (Attribute msg) -> Status -> Html msg

A status badge for the current transaction state.

Labels: "Idle" / "Awaiting Signature" / "Pending" / "Confirming" / "Confirmed" / "Failed" / "Rejected"

CSS classes: web3-tx-badge plus one of: web3-tx-badge--idle, web3-tx-badge--pending, web3-tx-badge--confirmed, web3-tx-badge--failed, web3-tx-badge--rejected

List (Attribute msg)
-> { label : String
, pendingLabel : String
, onPress : msg
}
-> Status
-> Html msg

An action button that is active in Idle and terminal states, and disabled while in-flight (AwaitingSignature, Submitted, Confirming).

Shows pendingLabel while the transaction is in-flight.

CSS classes: web3-action-btn, web3-action-btn--pending (added when disabled)

List (Attribute msg)
-> { explorerUrl : String }
-> Receipt
-> Html msg

Display a confirmed transaction receipt.

Root element: <div class="web3-receipt web3-receipt--success|failed">

Each field is wrapped in <div class="web3-receipt-field">.

CSS classes: web3-receipt, web3-receipt--success, web3-receipt--failed, web3-receipt-field