LibreChat/client/src/utils/cn.ts
Marco Beretta 8b9a7c521d
🔠 feat: Add 10, 11, 13 and 15px Steps to the Theme Type Scale (#16827)
* feat: Add 10, 11, 13 and 15px Steps to the Theme Type Scale

* test: Prove the Off-Scale Type Steps in the Mock Harness

* style: Sort cn Imports

* refactor: Name the 13 and 15px Steps 1xs and 1sm

* test: Probe the Type Step Roles Instead of Unused Utilities
2026-10-07 16:02:26 +02:00

16 lines
614 B
TypeScript

import { type ClassValue, clsx } from 'clsx';
import { extendTailwindMerge } from 'tailwind-merge';
/** Mirrors `TYPE_STEPS` in `@librechat/client`; imported values there are mocked away in specs. */
const twMerge = extendTailwindMerge({
extend: { classGroups: { 'font-size': [{ text: ['3xs', '2xs', '1xs', '1sm'] }] } },
});
/**
* Merges the tailwind clases (using twMerge). Conditionally removes false values
* @param inputs The tailwind classes to merge
* @returns className string to apply to an element or HOC
*/
export default function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}