UNPKG

@ozen-ui/kit

Version:

React component library

21 lines (20 loc) 1.34 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SidebarContent = exports.cnSidebarContent = void 0; var tslib_1 = require("tslib"); var react_1 = tslib_1.__importDefault(require("react")); var useThemeProps_1 = require("../../../../hooks/useThemeProps"); var utils_1 = require("../../../../utils"); var constants_1 = require("./constants"); exports.cnSidebarContent = (0, utils_1.cn)('SidebarContent'); exports.SidebarContent = (0, utils_1.polymorphicComponentWithRef)(function (inProps, ref) { var props = (0, useThemeProps_1.useThemeProps)({ props: inProps, name: 'SidebarContent', }); var _a = props.as, Tag = _a === void 0 ? constants_1.SIDEBAR_CONTENT_DEFAULT_TAG : _a, className = props.className, children = props.children, bottom = props.bottom, other = tslib_1.__rest(props, ["as", "className", "children", "bottom"]); return (react_1.default.createElement(Tag, tslib_1.__assign({}, other, { ref: ref, className: (0, exports.cnSidebarContent)('', [className]) }), react_1.default.createElement("div", { className: (0, exports.cnSidebarContent)('Content') }, children), bottom && react_1.default.createElement("div", { className: (0, exports.cnSidebarContent)('Bottom') }, bottom))); }); exports.SidebarContent.displayName = 'SidebarContent';