1 import * as React from 'react';
3 import { Icon } from '@proton/components';
4 import clsx from '@proton/utils/clsx';
6 import PopoverCloseButton from './PopoverCloseButton';
8 interface Props extends React.ComponentPropsWithRef<'header'> {
9 children?: React.ReactNode;
10 actions?: React.ReactNode;
12 isDraggable?: boolean;
15 const PopoverHeader = ({ children, onClose, actions, className, isDraggable = false, ...rest }: Props) => {
17 <header className={clsx(['eventpopover-header', className])} {...rest}>
18 <div className="eventpopover-actions flex justify-end">
19 {isDraggable && <Icon name="dots" className="mr-auto my-auto color-weak" />}
21 {!!actions && <span className="eventpopover-actions-separator" />}
22 <PopoverCloseButton onClose={onClose} />
29 export default PopoverHeader;