UNPKG

react-base-guide

Version:

react ui components

26 lines 1.43 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addCustomStyle = void 0; const addCssProp = (propsName, value) => { if (!propsName || !value) { return ""; } return `${propsName}: ${value};`; }; const addCustomStyle = (p, displayDefault) => ` ${addCssProp("display", (p === null || p === void 0 ? void 0 : p.display) || displayDefault)} ${addCssProp("width", p === null || p === void 0 ? void 0 : p.width)} ${addCssProp("min-width", p === null || p === void 0 ? void 0 : p.minWidth)} ${addCssProp("max-width", p === null || p === void 0 ? void 0 : p.maxWidth)} ${addCssProp("height", p === null || p === void 0 ? void 0 : p.height)} ${addCssProp("min-height", p === null || p === void 0 ? void 0 : p.minHeight)} ${addCssProp("max-height", p === null || p === void 0 ? void 0 : p.maxHeight)} ${addCssProp("margin", p === null || p === void 0 ? void 0 : p.margin)} ${addCssProp("margin-top", p === null || p === void 0 ? void 0 : p.marginTop)} ${addCssProp("margin-bottom", p === null || p === void 0 ? void 0 : p.marginBottom)} ${addCssProp("margin-left", p === null || p === void 0 ? void 0 : p.marginLeft)} ${addCssProp("margin-right", p === null || p === void 0 ? void 0 : p.marginRight)} `; exports.addCustomStyle = addCustomStyle; exports.default = exports.addCustomStyle; //# sourceMappingURL=add-custom-style.js.map