All files / src common.ts

0% Statements 0/24
0% Branches 0/1
0% Functions 0/1
0% Lines 0/24

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25                                                 
/**
 * Shared utilities for the Fiscozen Checkbox component library.
 *
 * @module @fiscozen/checkbox/common
 */

/**
 * Maps checkbox size variants to corresponding Tailwind CSS text size classes.
 *
 * Used to maintain consistent typography across checkbox labels and helper text.
 * Applied to both FzCheckbox and FzCheckboxGroup components.
 *
 * @constant
 * @type {Record<"sm" | "md", string>}
 *
 * @example
 * const labelClass = mapSizeToClasses[props.size]; // "text-sm" or "text-base"
 */
export const mapSizeToClasses = {
  /** Small size: 14px font size (0.875rem) */
  sm: "text-sm",
  /** Medium size: 16px font size (1rem) - default */
  md: "text-base",
};