UNPKG

@empathyco/x-tailwindcss

Version:
19 lines (16 loc) 527 B
import { rename, map } from '@empathyco/x-utils'; /** * Returns the `max width` variants of component `layout`. * * @param helpers - The {@link TailwindHelpers} to generate CSS. * @returns The {@link CssStyleOptions} for the component. */ function maxWidth(helpers) { const { theme } = helpers; return { 'max-width': rename(map(theme('x.layoutMaxWidth'), (maxWidthName, maxWidthValue) => ({ '--x-layout-max-width': maxWidthValue, })), { prefix: '&-' }), }; } export { maxWidth };