@magicbe/design
Version:
React + Antd Drag Drop Visual design
37 lines (36 loc) • 2.34 kB
JavaScript
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { AutoComplete, Collapse, Form } from "antd";
import createInstance from "@emotion/css/create-instance";
var _a = createInstance({ key: "overflow" }), css = _a.css, cx = _a.cx;
var Overflow = function () {
var overflow = [
{ value: "visible" },
{ value: "hidden" },
{ value: "clip" },
{ value: "scroll" },
{ value: "auto" },
];
var header_style = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .ant-collapse-header {\n align-items: center !important;\n }\n "], ["\n .ant-collapse-header {\n align-items: center !important;\n }\n "])));
var extra_style = css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 150px !important;\n "], ["\n width: 150px !important;\n "])));
var onClick = function (event) {
event.stopPropagation();
};
return (_jsx(Form.Item, { children: _jsx(Collapse, { children: _jsxs(Collapse.Panel, __assign({ forceRender: true, header: "溢出", extra: (_jsx(Form.Item, __assign({ name: ["style", "overflow"], noStyle: true }, { children: _jsx(AutoComplete, { options: overflow, className: extra_style, onClick: onClick }) }))), className: header_style }, { children: [_jsx(Form.Item, __assign({ name: ["style", "overflowX"], label: "overflowX" }, { children: _jsx(AutoComplete, { options: overflow }) })), _jsx(Form.Item, __assign({ name: ["style", "overflowY"], label: "overflowY" }, { children: _jsx(AutoComplete, { options: overflow }) }))] }), "overflow") }) }));
};
export default Overflow;
var templateObject_1, templateObject_2;