From e37f31c4151f7cb08d3303d645d393711785b2b5 Mon Sep 17 00:00:00 2001 From: Alexey Iskhakov Date: Fri, 23 Jan 2026 03:26:55 +0200 Subject: [PATCH] fix: `shouldUseClsx` should respect the `preferClsxWrapper` option for both class and className attrs --- src/formatter.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/formatter.ts b/src/formatter.ts index d95b582..b8b11ba 100644 --- a/src/formatter.ts +++ b/src/formatter.ts @@ -75,10 +75,7 @@ function shouldUseClsx(attrName: string | undefined, preferClsxWrapper: boolean) if (!attrName) { return false; } - if (attrName === "className") { - return true; - } - return preferClsxWrapper && attrName === "class"; + return preferClsxWrapper && (attrName === "class" || attrName === "className"); } function hasAnyGroups(groups: Map): boolean {