phx-react
Version:
PHX REACT
13 lines • 1.16 kB
JavaScript
;
exports.__esModule = true;
exports.PHXHorizontalStack = void 0;
var tslib_1 = require("tslib");
var react_1 = tslib_1.__importDefault(require("react"));
var types_1 = require("../types");
function PHXHorizontalStack(_a) {
var justify = _a.justify, items = _a.items, gapX = _a.gapX, gapY = _a.gapY, children = _a.children;
var customHorizon = (0, types_1.classNames)(justify === 'start' && 'justify-start', justify === 'end' && 'justify-end', justify === 'center' && 'justify-center', justify === 'around' && 'justify-around', justify === 'between' && 'justify-between', justify === 'evenly' && 'justify-evenly', justify === 'stretch' && 'justify-stretch', items === 'start' && 'items-start', items === 'end' && 'items-end', items === 'center' && 'items-center', items === 'baseline' && 'items-baseline', items === 'stretch' && 'items-stretch');
return (react_1["default"].createElement("div", { className: "flex ".concat(gapX ? 'gap-x-' + gapX : null, " ").concat(gapY ? 'gap-y-' + gapY : null, " ").concat(customHorizon) }, children));
}
exports.PHXHorizontalStack = PHXHorizontalStack;
//# sourceMappingURL=HorizontalStack.js.map