Skip to content

Commit

Permalink
Add with_answered_prompt_prefix to RenderConfig (#191)
Browse files Browse the repository at this point in the history
* add `with_answered_prompt_prefix` to RenderConfig

* update changelog
  • Loading branch information
darkecho731 authored Dec 27, 2023
1 parent 79f02db commit 2948f2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- Ctrl-b/Ctrl-f for left/right
- Ctrl-j/Ctrl-g for enter/cancel
- Added 'with_starting_filter_input' to both Select and MultiSelect, which allows for setting an initial value to the filter section of the prompt.
- Added 'with_answered_prompt_prefix' to RenderConfig to allow customization of answered prompt prefix

### Fixes

Expand Down
6 changes: 6 additions & 0 deletions inquire/src/ui/render_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ impl<'a> RenderConfig<'a> {
self
}

/// Sets the answered prompt prefix and its style sheet.
pub fn with_answered_prompt_prefix(mut self, answered_prompt_prefix: Styled<&'a str>) -> Self {
self.answered_prompt_prefix = answered_prompt_prefix;
self
}

/// Sets style for text inputs.
pub fn with_text_input(mut self, text_input: StyleSheet) -> Self {
self.text_input = text_input;
Expand Down

0 comments on commit 2948f2a

Please sign in to comment.