1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! The styles a table is drawn with.
use crate;
/// A table's styles: Bubbles' `table.Styles`.
///
/// ```
/// use petitcarnets as tea;
/// use tea::bubbles::table::{self, Column};
/// use tea::style::strip_ansi;
/// # fn cities() -> table::Model {
/// # let mut t = table::Model::new()
/// # .with_columns(vec![Column::new("City", 5), Column::new("Country", 7)])
/// # .with_height(4)
/// # .with_width(20);
/// # t.from_values("Tokyo,Japan\nDelhi,India\nCairo,Egypt", ",");
/// # t
/// # }
///
/// let plain = table::Styles {
/// header: tea::style::Style::new(),
/// cell: tea::style::Style::new(),
/// selected: tea::style::Style::new(),
/// };
/// let t = cities().with_styles(plain);
/// assert_eq!(t.view().lines().next(), Some("City Country"));
/// ```