nb_cli.prompts.checkbox

class CheckboxPrompt(question, choices, question_mark='[?]', pointer='❯', selected_sign='●', unselected_sign='○', annotation='(Use ↑ and ↓ to move, Space to select, Enter to submit)', max_height=None, validator=None)

  • 说明

    Checkbox Prompt that supports auto scrolling.

    Style class guide:

    [?] Choose a choice and return? (Use ↑ and ↓ to move, Space to select, Enter to submit)
    └┬┘ └──────────────┬──────────┘ └───────────────────────┬─────────────────────────────┘
    questionmark question annotation

    ❯ ● choice selected
    └┬┘└┬┘ └───────┬─────┘
    pointer sign selected

    ○ choice unselected
    └┬┘ └───────┬───────┘
    unsign unselected
  • 参数

    • question (str)

    • choices (list[Choice[(~ RT)]])

    • question_mark (str)

    • pointer (str)

    • selected_sign (str)

    • unselected_sign (str)

    • annotation (str)

    • max_height (int | None)

    • validator ((tuple[Choice[(~ RT)], ...]) -> bool | None)

property max_height

  • 类型: int