Skip to content

Instantly share code, notes, and snippets.

@MantasMikal
Created August 2, 2023 19:17

Revisions

  1. MantasMikal revised this gist Aug 2, 2023. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion cn.ts
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,6 @@ import { clsx, ClassValue } from "clsx";
    /**
    * Inteligently merge tw classess with clsx concatination
    **/

    export function cn(...inputs: ClassValue[]) {
    return twMerge(clsx(inputs));
    }
  2. MantasMikal created this gist Aug 2, 2023.
    10 changes: 10 additions & 0 deletions cn.ts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    import { twMerge } from "tailwind-merge";
    import { clsx, ClassValue } from "clsx";

    /**
    * Inteligently merge tw classess with clsx concatination
    **/

    export function cn(...inputs: ClassValue[]) {
    return twMerge(clsx(inputs));
    }