material_ui_rs/design/style/
table.rs1use iced_widget::core::Background;
2use iced_widget::table::{Catalog, Style, StyleFn};
3
4use crate::Theme;
5
6impl Catalog for Theme {
7 type Class<'a> = StyleFn<'a, Self>;
8
9 fn default<'a>() -> Self::Class<'a> {
10 Box::new(default)
11 }
12
13 fn style(&self, class: &Self::Class<'_>) -> Style {
14 class(self)
15 }
16}
17
18pub fn default(theme: &Theme) -> Style {
19 let separator = theme.colors().outline.variant;
20
21 Style {
22 separator_x: Background::Color(separator),
23 separator_y: Background::Color(separator),
24 }
25}
26
27#[cfg(test)]
28#[path = "../../../tests/design/style/table.rs"]
29mod tests;