material-ui-rs 0.5.2

A Material3 inspired theme for `iced`
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::*;
use crate::utils::disabled_text;

#[test]
fn outlined_text_input_alpha_scales_input_layer_colors() {
    let theme = Theme::Light;
    let colors = theme.colors();
    let style = input_layer_style_alpha(&theme, iced_text_input::Status::Active, 0.5);

    assert_eq!(style.value, alpha_color(colors.surface.text, 0.5));
    assert_eq!(style.icon, alpha_color(colors.surface.text_variant, 0.5));
    assert_eq!(
        style.selection,
        alpha_color(disabled_text(colors.primary.color), 0.5)
    );
    assert_eq!(style.placeholder, Color::TRANSPARENT);
}