UNPKG

@trimble-oss/moduswebcomponents

Version:

Modus Web Components is a modern, accessible UI library built with Stencil JS that provides reusable web components following Trimble's Modus design system. This updated version focuses on improved flexibility, enhanced theming options, comprehensive cust

16 lines (15 loc) 488 B
const HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']; export const convertPropsToClasses = ({ size, weight, variant, }) => { let classes = ''; // Heading styles are handled in modus-wc-typography.scss if (variant && HEADINGS.includes(variant)) { return classes; } if (size) { classes = `${classes} modus-wc-text-${size}`; } if (weight) { classes = `${classes} modus-wc-typography-weight-${weight}`; } return classes.trim(); };