@cuvp1225/tango-mail
Version:
react mail components for tango
23 lines (22 loc) • 958 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Box = void 0;
const tslib_1 = require("tslib");
const tango_boot_1 = require("@music163/tango-boot");
const react_1 = tslib_1.__importDefault(require("react"));
const placeholder_1 = require("../placeholder");
function BoxView(_a) {
var { p, m, bg, color, style, children } = _a, props = tslib_1.__rest(_a, ["p", "m", "bg", "color", "style", "children"]);
return (react_1.default.createElement("div", Object.assign({}, props, { style: getBoxStyle({ p, m, bg, color, style }) }), children));
}
function getBoxStyle({ p, m, bg, color, style, }) {
return Object.assign({ padding: p, margin: m, backgroundColor: bg, color }, style);
}
exports.Box = (0, tango_boot_1.defineComponent)(BoxView, {
name: 'Box',
designerConfig: {
defaultProps: {
children: react_1.default.createElement(placeholder_1.Placeholder, null),
},
},
});