gaucho-labs/tailwind-fuse

Option<str> in tw_join and merge.

Closed this issue · 0 comments

Just ported to 0.2, all good other than the removal of Option<str> in tw_join and tw_merge is a bit painful, I'm assuming this was for performance/less allocations.

It does make the user experience quite a bit worse and am wondering if there's any way to get back to the old behaviour?

Example of a casulty:

tw_join!(
    "tw-relative tw-flex tw-justify-center tw-rounded-md tw-border-2 tw-border-dashed tw-px-6 tw-py-3",
    match disabled.get() { Some(true) => "tw-bg-gray-500/50 tw-cursor-not-allowed",
    _ => "tw-bg-base-500", }, errors_exist.then_some("tw-border-red-500")
    .unwrap_or_default(), (! files_exist && ! errors_exist)
    .then_some("tw-border-text-500").unwrap_or_default(), (files_exist && !
    errors_exist).then_some("tw-border-success-500").unwrap_or_default(),
    errors_exist.then_some("tw-border-red-500").unwrap_or_default(), (!
    errors_exist).then_some("focus:tw-border-primary-500").unwrap_or_default(),
)