mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 07:19:41 +02:00
feat(system): path to upgrade standalone to BE [EE-4071] (#8095)
This commit is contained in:
parent
756ac034ec
commit
5cbf52377d
73 changed files with 1374 additions and 421 deletions
33
app/react/components/modals/Modal/ModalHeader.tsx
Normal file
33
app/react/components/modals/Modal/ModalHeader.tsx
Normal file
|
@ -0,0 +1,33 @@
|
|||
import clsx from 'clsx';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
import { ModalType } from './types';
|
||||
import { useModalContext } from './Modal';
|
||||
import styles from './ModalHeader.module.css';
|
||||
|
||||
interface Props {
|
||||
title: ReactNode;
|
||||
modalType?: ModalType;
|
||||
}
|
||||
|
||||
export function ModalHeader({ title, modalType }: Props) {
|
||||
useModalContext();
|
||||
|
||||
return (
|
||||
<div className={styles.modalHeader}>
|
||||
{modalType && (
|
||||
<div
|
||||
className={clsx({
|
||||
[styles.backgroundError]: modalType === ModalType.Destructive,
|
||||
[styles.backgroundWarning]: modalType === ModalType.Warn,
|
||||
})}
|
||||
/>
|
||||
)}
|
||||
{typeof title === 'string' ? (
|
||||
<h5 className="font-bold">{title}</h5>
|
||||
) : (
|
||||
title
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue