UNPKG

@cuvp1225/tango-mail

Version:
29 lines (28 loc) 1.29 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Section = void 0; const tslib_1 = require("tslib"); const react_1 = tslib_1.__importDefault(require("react")); const tango_boot_1 = require("@music163/tango-boot"); const placeholder_1 = require("../placeholder"); function SectionView(_a) { var { p = '0', children, bg, color, style } = _a, props = tslib_1.__rest(_a, ["p", "children", "bg", "color", "style"]); return (react_1.default.createElement("table", Object.assign({ align: "center", width: "100%", border: 0, cellPadding: p, cellSpacing: "0", role: "presentation", style: getTableStyle({ bg, color, style }) }, props), react_1.default.createElement("tbody", null, react_1.default.createElement("tr", null, react_1.default.createElement("td", null, children))))); } function getTableStyle({ bg, color, style, }) { return Object.assign({ backgroundColor: bg, color }, style); } exports.Section = (0, tango_boot_1.defineComponent)(SectionView, { name: 'Section', designerConfig: { defaultProps: { children: react_1.default.createElement(placeholder_1.Placeholder, null), style: { border: '1px dashed #999', }, }, }, });