@empathyco/x-tailwindcss
Version:
Empathy X Tailwind plugin
21 lines (17 loc) • 558 B
JavaScript
;
var xUtils = require('@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': xUtils.rename(xUtils.map(theme('x.layoutMaxWidth'), (maxWidthName, maxWidthValue) => ({
'--x-layout-max-width': maxWidthValue,
})), { prefix: '&-' }),
};
}
exports.maxWidth = maxWidth;