stylex-webpack
Version:
The another Webpack Plugin for Facebook's StyleX
25 lines (21 loc) • 594 B
JavaScript
;
var clsx = require('clsx');
function stylexPropsWithClassName(stylexProps, ...inputs) {
return {
...stylexProps,
className: clsx.clsx(stylexProps.className, ...inputs)
};
}
function stylexPropsWithStyleObject(stylexProps, style) {
return {
...stylexProps,
style: {
...stylexProps.style,
...style
}
};
}
const DEFAULT_XSTYLE = [];
exports.DEFAULT_XSTYLE = DEFAULT_XSTYLE;
exports.stylexPropsWithClassName = stylexPropsWithClassName;
exports.stylexPropsWithStyleObject = stylexPropsWithStyleObject;