builderx 0.1.0

A concise builder-pattern UI DSL for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#![cfg(feature = "gpui")]

use builderx::bx;
use gpui::{div, prelude::*, rgb};

#[test]
fn facade_reexports_and_default_adapter_work() {
    let mut element = bx! {
        div[flex, bg(rgb(0x111111))]{ "hi" }
    };

    assert_eq!(element.style().display, Some(gpui::Display::Flex));
}