UNPKG

@vertisanpro/flowbite-react

Version:

Non-Official React components built for Flowbite and Tailwind CSS

11 lines (10 loc) 543 B
'use client'; import { twMerge } from '@vertisanpro/tailwind-merge'; import React from 'react'; import { mergeDeep } from '../../helpers/merge-deep'; import { useNavbarContext } from './NavbarContext'; export const NavbarBrand = ({ as: Component = 'a', children, className, theme: customTheme = {}, ...props }) => { const { theme: rootTheme } = useNavbarContext(); const theme = mergeDeep(rootTheme.brand, customTheme); return (React.createElement(Component, { className: twMerge(theme.base, className), ...props }, children)); };