UNPKG

@ozen-ui/kit

Version:

React component library

18 lines (17 loc) 1.07 kB
import { __assign, __rest } from "tslib"; import React from 'react'; import { useThemeProps } from '../../../../hooks/useThemeProps'; import { cn, polymorphicComponentWithRef } from '../../../../utils'; import { SIDEBAR_CONTENT_DEFAULT_TAG } from './constants'; export var cnSidebarContent = cn('SidebarContent'); export var SidebarContent = polymorphicComponentWithRef(function (inProps, ref) { var props = useThemeProps({ props: inProps, name: 'SidebarContent', }); var _a = props.as, Tag = _a === void 0 ? SIDEBAR_CONTENT_DEFAULT_TAG : _a, className = props.className, children = props.children, bottom = props.bottom, other = __rest(props, ["as", "className", "children", "bottom"]); return (React.createElement(Tag, __assign({}, other, { ref: ref, className: cnSidebarContent('', [className]) }), React.createElement("div", { className: cnSidebarContent('Content') }, children), bottom && React.createElement("div", { className: cnSidebarContent('Bottom') }, bottom))); }); SidebarContent.displayName = 'SidebarContent';