@empathyco/x-tailwindcss
Version:
Empathy X Tailwind plugin
19 lines (16 loc) • 522 B
JavaScript
import { rename, map } from '@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': rename(map(theme('x.spacing'), (spacingName, spacingValue) => ({
'--x-layout-min-margin': spacingValue,
})), { prefix: '&-' }),
};
}
export { minMargin };