Skip to content

Commit

Permalink
small readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburniske committed Apr 2, 2024
1 parent e5cef51 commit 48b8c63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ cargo add tailwind-fuse

You can use [`tw_join!`] to join Tailwind classes, and [`tw_merge!`] to merge Tailwind Classes handling conflicts.


You can use anything that implements [`AsRef<str>`] or [`AsTailwindClass`]

```rust
use tailwind_fuse::*;

// No conflict resolution
// "flex items-center justify-center"
let joined_class = tw_join!("flex items-center", "justify-center");

assert_eq!(
"flex items-center justify-center",
tw_join!("flex", "items-center", "justify-center")
);

// Conflict resolution
// Right most class takes precedence
Expand Down
7 changes: 4 additions & 3 deletions fuse/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@
//! use tailwind_fuse::*;
//!
//! // No conflict resolution
//! // "flex items-center justify-center"
//! let joined_class = tw_join!("flex items-center", "justify-center");
//!
//! assert_eq!(
//! "flex items-center justify-center",
//! tw_join!("flex", "items-center", "justify-center")
//! );
//!
//! // Conflict resolution
//! // Right most class takes precedence
Expand Down

0 comments on commit 48b8c63

Please sign in to comment.