@empathyco/x-tailwindcss
Version:
Empathy X Tailwind plugin
35 lines (32 loc) • 993 B
JavaScript
import { rename } from '@empathyco/x-utils';
import { badgeBright } from './bright.js';
import { badgeCircle } from './circle.js';
import { badgeColors } from './colors.js';
import { badgeDefault } from './default.js';
import { badgeLight } from './light.js';
import { badgeOutlined } from './outlined.js';
import { badgeSizes } from './sizes.js';
/**
* Returns the component `badge` CSS.
*
* @param helpers - The {@link TailwindHelpers} to generate CSS.
* @returns The {@link CssStyleOptions} for the component.
*/
function badge(helpers) {
return {
'.x-badge': {
...badgeDefault(helpers),
...rename({
...badgeSizes(helpers),
...badgeCircle(helpers),
...badgeColors(helpers),
...badgeOutlined(helpers),
...badgeLight(helpers),
...badgeBright(helpers),
}, {
prefix: '&-',
}),
},
};
}
export { badge };