mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-23 16:34:27 +00:00
* 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
16 lines
614 B
TypeScript
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));
|
|
}
|