@ozen-ui/kit
Version:
React component library
16 lines (15 loc) • 837 B
JavaScript
import { __assign, __rest } from "tslib";
import React from 'react';
import { useThemeProps } from '../../../../hooks/useThemeProps';
import { cn, polymorphicComponentWithRef } from '../../../../utils';
import { SIDEBAR_LIST_DEFAULT_TAG } from './constants';
export var cnSidebarList = cn('SidebarList');
export var SidebarList = polymorphicComponentWithRef(function (inProps, ref) {
var props = useThemeProps({
props: inProps,
name: 'SidebarList',
});
var _a = props.as, Tag = _a === void 0 ? SIDEBAR_LIST_DEFAULT_TAG : _a, className = props.className, children = props.children, other = __rest(props, ["as", "className", "children"]);
return (React.createElement(Tag, __assign({}, other, { ref: ref, className: cnSidebarList('', [className]) }), children));
});
SidebarList.displayName = 'SidebarList';