Closed jdx closed 7 months ago
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("john.doe@acme.com")
.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
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