2021-11-16 16:51:49 +02:00
|
|
|
import clsx from 'clsx';
|
|
|
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
|
|
|
2025-05-13 22:15:04 +12:00
|
|
|
import { WidgetIcon } from './WidgetIcon';
|
2021-11-16 16:51:49 +02:00
|
|
|
|
|
|
|
interface Props {
|
|
|
|
title: ReactNode;
|
|
|
|
icon: ReactNode;
|
|
|
|
className?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function WidgetTitle({
|
|
|
|
title,
|
|
|
|
icon,
|
|
|
|
className,
|
|
|
|
children,
|
|
|
|
}: PropsWithChildren<Props>) {
|
|
|
|
return (
|
|
|
|
<div className="widget-header">
|
|
|
|
<div className="row">
|
2022-09-02 18:30:34 +03:00
|
|
|
<span className={clsx('pull-left vertical-center', className)}>
|
2025-05-13 22:15:04 +12:00
|
|
|
<WidgetIcon icon={icon} />
|
|
|
|
<h2 className="text-base m-0 ml-1">{title}</h2>
|
2021-11-16 16:51:49 +02:00
|
|
|
</span>
|
|
|
|
<span className={clsx('pull-right', className)}>{children}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|