import clsx from 'clsx'; import { PropsWithChildren, ReactNode } from 'react'; import { WidgetIcon } from './WidgetIcon'; import { useWidgetContext } from './Widget'; interface Props { title: ReactNode; icon?: ReactNode; className?: string; } export function WidgetTitle({ title, icon, className, children, }: PropsWithChildren) { const { titleId } = useWidgetContext(); return (
{icon && }

{title}

{children}
); }