Coda by Ian Macalinao
    Preparing search index...

    Interface AmountNumberDisplayNode<TDecimals, TUnit>

    Display metadata that presents a number as a scaled amount with an optional unit. The value is divided by 10 ^ decimals and rendered alongside unit (e.g. "USDC", "%", "bps").

    interface AmountNumberDisplayNode<
        TDecimals extends
            InjectableNumberValueNode
            | undefined = InjectableNumberValueNode | undefined,
        TUnit extends
            InjectableStringValueNode
            | undefined = InjectableStringValueNode | undefined,
    > {
        decimals?: TDecimals;
        kind: "amountNumberDisplayNode";
        unit?: TUnit;
    }

    Type Parameters

    Index
    decimals?: TDecimals

    How many decimal places scale the underlying integer. Resolved as a number value: either a literal numberValueNode or a key resolved from a surrounding provider. A value of 1000000 with decimals resolving to 6 renders as 1. When this input cannot resolve, renderers should fall back to presenting the raw value rather than guess the scale.

    kind: "amountNumberDisplayNode"
    unit?: TUnit

    A label appended after the scaled value (e.g. "USDC", "%", "bps"). Resolved as a string value: either a literal stringValueNode or a key resolved from a surrounding provider. When this input cannot resolve, renderers should present the scaled value without a unit.