Skip to content

Commit 389f68f

Browse files
committed
design-system-react: twMerge recognizes new simplified typography classes (text-*) while keeping legacy tokens for deduplication
1 parent 4b50dc2 commit 389f68f

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

packages/design-system-react/src/utils/tw-merge.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { extendTailwindMerge } from 'tailwind-merge';
22

3+
// Register both legacy (s-*/l-*) and new simplified typography tokens so
4+
// twMerge can properly resolve conflicts regardless of which format is used.
35
const variantClassGroups = [
6+
// Legacy tokens (kept for backward compatibility)
47
's-display-lg',
58
's-display-md',
69
's-heading-lg',
@@ -29,6 +32,21 @@ const variantClassGroups = [
2932
'l-button-label-md',
3033
'l-button-label-lg',
3134
'l-amount-display-lg',
35+
// New simplified tokens (current Text variant class names)
36+
'display-lg',
37+
'display-md',
38+
'heading-lg',
39+
'heading-md',
40+
'heading-sm',
41+
'body-lg',
42+
'body-md',
43+
'body-sm',
44+
'body-xs',
45+
'page-heading',
46+
'section-heading',
47+
'button-label-md',
48+
'button-label-lg',
49+
'amount-display-lg',
3250
];
3351

3452
/**

0 commit comments

Comments
 (0)