@vertisanpro/flowbite-react
Version:
Non-Official React components built for Flowbite and Tailwind CSS
12 lines (11 loc) • 607 B
JavaScript
'use client';
import { twMerge } from '@vertisanpro/tailwind-merge';
import React from 'react';
import { mergeDeep } from '../../helpers/merge-deep';
import { useSidebarContext } from './SidebarContext';
export const SidebarItems = ({ children, className, theme: customTheme = {}, ...props }) => {
const { theme: rootTheme } = useSidebarContext();
const theme = mergeDeep(rootTheme.items, customTheme);
return (React.createElement("div", { className: twMerge(theme.base, className), "data-testid": "flowbite-sidebar-items", ...props }, children));
};
SidebarItems.displayName = 'Sidebar.Items';