@empathyco/x-tailwindcss
Version:
Empathy X Tailwind plugin
21 lines (17 loc) • 554 B
JavaScript
;
var xUtils = require('@empathyco/x-utils');
/**
* Returns the `min-margin` variants of component `layout`.
*
* @param helpers - The {@link TailwindHelpers} to generate CSS.
* @returns The {@link CssStyleOptions} for the component.
*/
function minMargin(helpers) {
const { theme } = helpers;
return {
'min-margin': xUtils.rename(xUtils.map(theme('x.spacing'), (spacingName, spacingValue) => ({
'--x-layout-min-margin': spacingValue,
})), { prefix: '&-' }),
};
}
exports.minMargin = minMargin;