@heybox/hb-sdk API Reference - v0.9.5
    正在准备搜索索引...

    接口 TextOptions

    text 节点的可选项。

    interface TextOptions {
        id?: string;
        maxLines?: number;
        paint?: "achievement-completion";
        reserveLines?: boolean;
        spans?: readonly { marks?: ("strong" | "em")[]; text: string }[];
        tone?:
            | "default"
            | "success"
            | "warning"
            | "accent"
            | "muted"
            | "danger"
            | "strong"
            | "tertiary";
        variant?: | "title"
        | "status"
        | "body"
        | "meta"
        | "label"
        | "display"
        | "title-large"
        | "subtitle"
        | "body-large"
        | "caption"
        | "status-large"
        | "meta-large"
        | "meta-compact"
        | "data-label";
        weight?: "medium"
        | "regular"
        | "semibold";
    }
    索引

    属性

    id?: string

    稳定键。

    maxLines?: number

    截断行数。

    paint?: "achievement-completion"

    宿主批准的完整文本 Paint;应同时声明 tone 供旧宿主降级。

    reserveLines?: boolean

    按 maxLines 预留完整行高,使短标题与多行标题对齐。

    spans?: readonly { marks?: ("strong" | "em")[]; text: string }[]

    行内富文本片段。

    调用方仍必须给出与片段拼接一致的 value:它是不认识 spans 的宿主的降级渲染源。

    tone?:
        | "default"
        | "success"
        | "warning"
        | "accent"
        | "muted"
        | "danger"
        | "strong"
        | "tertiary"

    语气。

    variant?:
        | "title"
        | "status"
        | "body"
        | "meta"
        | "label"
        | "display"
        | "title-large"
        | "subtitle"
        | "body-large"
        | "caption"
        | "status-large"
        | "meta-large"
        | "meta-compact"
        | "data-label"

    语义层级。

    weight?: "medium" | "regular" | "semibold"

    字重覆写。