-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
custom theme support #15
Labels
enhancement
New feature or request
Comments
What do you have in mind here? By exposing some helper methods for the colors, a custom theme could already be achieved with something like let theme = Theme {
cursor: Theme::color_rgb(166, 227, 161),
selected_prefix: String::from("(*)"),
unselected_prefix: String::from("( )"),
..Default::default()
}; |
perhaps just documenting how to do it |
One thing i find a bit cumbersome is the fact that a theme needs to be cloned when used with multiple inputs. Not sure if thats expensive or generally an accepted pattern in Rust. let mut theme = Theme::new();
let i = Input::new("What's your e-mail?")
.description("Please enter your e-mail address.")
.placeholder("[email protected]")
.theme(theme.clone());
i.run().expect("error running input");
let c = Confirm::new("Confirm privacy policy")
.description("Do you accept the privacy policy?")
.affirmative("Yes")
.negative("No")
.theme(theme.clone());
c.run().expect("error running confirm"); |
created #22 to address that |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: