Skip to content

Commit

Permalink
fix twMerge to use our prefix (#999)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-ubs authored Jul 12, 2024
1 parent dfc7131 commit f6a5219
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/platform-bible-react/src/utils/shadcn-ui.util.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { type ClassValue, clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { extendTailwindMerge } from 'tailwind-merge';

const twMergeCustom = extendTailwindMerge({prefix: 'pr-'});

// shadcn/ui uses this export in its boilerplate code
// eslint-disable-next-line import/prefer-default-export
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
return twMergeCustom(clsx(inputs));
}

0 comments on commit f6a5219

Please sign in to comment.