UNPKG

@kbfront/kb-ui

Version:

KB React UI Library

45 lines 2.07 kB
"use strict"; 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); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.EBorderStyle = void 0; var react_1 = __importDefault(require("react")); var index_1 = require("../../enum/index"); require("./index.scss"); var EBorderStyle; (function (EBorderStyle) { EBorderStyle["SOLID"] = "solid"; EBorderStyle["DASHED"] = "dashed"; EBorderStyle["DOTTED"] = "dotted"; })(EBorderStyle = exports.EBorderStyle || (exports.EBorderStyle = {})); var Bordered = function (_a) { var children = _a.children, _b = _a.color, color = _b === void 0 ? index_1.EColor.SECONDARY : _b, rightWidth = _a.rightWidth, leftWidth = _a.leftWidth, topWidth = _a.topWidth, bottomWidth = _a.bottomWidth, _c = _a.radius, radius = _c === void 0 ? 0 : _c, leftStyle = _a.leftStyle, rightStyle = _a.rightStyle, bottomStyle = _a.bottomStyle, topStyle = _a.topStyle, style = _a.style, width = _a.width; var divStyle = { borderRightWidth: rightWidth + "px", borderLeftWidth: leftWidth + "px", borderTopWidth: topWidth + "px", borderBottomWidth: bottomWidth + "px", borderRadius: radius + "%", borderLeftStyle: leftStyle, borderRightStyle: rightStyle, borderBottomStyle: bottomStyle, borderTopStyle: topStyle, borderStyle: "" + style, borderWidth: width + "px", }; return react_1.default.createElement("div", { style: __assign({}, divStyle), className: "kb-bordered color-" + color }, children); }; exports.default = Bordered; //# sourceMappingURL=index.js.map