Skip to main content

style_if

Macro style_if 

Source
macro_rules! style_if {
    ($condition:expr => $style:expr) => { ... };
}
Expand description

Utility macro for conditional styles

§Example

use dioxus_ui_system::style_if;

let is_active = true;
let style = style_if!(is_active => "background: blue;");