intrepidshape/elm-web3-ui/3.0.0

NOTE: the latest version is 4.0.0

Web3.Ui.FeeBreakdown

Render a fee-split table. Each row is one slice of the fee -- the caller provides labels, basis points, and (optionally) the Wei amount that slice will receive at the current trade size.

Web3.Ui.FeeBreakdown.view
    { totalBps = 150
    , symbol = "PLS"
    , decimals = 18
    , gross = Just tradeGrossWei
    , slices =
        [ { label = "Creator", bps = 50, recipient = Just creatorAddr }
        , { label = "Protocol", bps = 10, recipient = Nothing }
        , { label = "Platform", bps = 20, recipient = Nothing }
        , { label = "Token pool", bps = 70, recipient = Nothing }
        ]
    }

Style classes: web3-feebreakdown, web3-feebreakdown__row, web3-feebreakdown__label, web3-feebreakdown__bps, web3-feebreakdown__amount, web3-feebreakdown__total.

{ totalBps : Int
, symbol : String
, decimals : Int
, gross : Maybe BigInt
, slices : List Slice
}
-> Html msg

Render the breakdown table.

type alias Slice =
{ label : String
, bps : Int
, recipient : Maybe Address
}

One row of the fee table.