1 import type { FC, ReactNode } from 'react';
3 import clsx from '@proton/utils/clsx';
12 export const PanelHeader: FC<Props> = ({ className, actions, ...props }) => {
13 const title = 'title' in props ? props.title : undefined;
14 const subtitle = 'subtitle' in props ? props.subtitle : undefined;
15 const withActions = Array.isArray(actions) && actions.length > 0;
16 const onlyActions = withActions && [title, subtitle].every((prop) => prop === undefined);
20 className={clsx('pass-panel-header flex flex-nowrap justify-space-between items-center gap-4', className)}
22 {title !== undefined && (
31 'flex flex-nowrap justify-space-between items-center shrink-0 gap-1',
32 onlyActions && 'w-full'