Skip to content

Commit

Permalink
feat(text): add raw! and styled! macros
Browse files Browse the repository at this point in the history
These macros are similar to the format! macro, but return a raw or
styled Span instead of a String.

```rust
use ratatui_macros::{raw, styled};

let name = "world";
raw!("Hello, {name}!");
styled!(Style::new().green(), "Hello, {name}!");
styled!(Color::Green, "Hello, {name}!");
styled!(Modifier::BOLD, "Hello, {name}!");
```
  • Loading branch information
joshka committed Jan 13, 2024
1 parent 2c02a56 commit e81f2ff
Show file tree
Hide file tree
Showing 5 changed files with 786 additions and 1 deletion.
Loading

0 comments on commit e81f2ff

Please sign in to comment.