Skip to content

Commit

Permalink
add builder functions (#731)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxomatic458 authored Jan 29, 2024
1 parent 34af84e commit 090af4d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/menu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,24 @@ pub trait MenuBuilder: Menu + Sized {
self
}

/// Menu builder with new value for match style
/// This is the style of the part of the input text, the suggestions
/// are based on
#[must_use]
fn with_match_text_style(mut self, color: Style) -> Self {
self.settings_mut().color.match_style = color;
self
}

/// Menu builder with new value for selected match style
/// This is the style of the part of the input text, the suggestions
/// are based on
#[must_use]
fn with_selected_match_text_style(mut self, color: Style) -> Self {
self.settings_mut().color.selected_match_style = color;
self
}

/// Menu builder with new value for marker
#[must_use]
fn with_marker(mut self, marker: &str) -> Self {
Expand Down

0 comments on commit 090af4d

Please sign in to comment.