UNPKG

@patreon/studio

Version:

Patreon Studio Design System

19 lines 805 B
import cx from 'classnames'; import { wrapResponsive } from '~/utilities/opaque-responsive'; import { classNameForResponsiveValue, createResponsiveClassNameLookup } from '~/utilities/responsive-style'; import styles from './BodyTextBundle.module.css'; const classNameBodySizeLookup = createResponsiveClassNameLookup(styles, { xs: 'sizeXs', sm: 'sizeSm', md: 'sizeMd', lg: 'sizeLg', }); export function classNameForBodyText(config) { const responsiveSize = wrapResponsive(config?.size ?? 'md'); const weight = config?.weight ?? 'normal'; return cx(styles.shared, { [styles.weightNormal]: weight === 'normal', [styles.weightBold]: weight === 'bold', }, classNameForResponsiveValue(responsiveSize, classNameBodySizeLookup)); } //# sourceMappingURL=index.js.map