mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 08:19:40 +02:00
feat(home): move edge device to view [EE-4559] (#8189)
Co-authored-by: matias.spinarolli <matias.spinarolli@portainer.io>
This commit is contained in:
parent
b4a6f6911c
commit
7fe0712b61
72 changed files with 988 additions and 1593 deletions
|
@ -12,7 +12,7 @@ export function CloseButton({
|
|||
return (
|
||||
<button
|
||||
type="button"
|
||||
className={clsx(styles.close, className, 'absolute top-2 right-2')}
|
||||
className={clsx(styles.close, className, 'absolute top-4 right-5')}
|
||||
onClick={() => onClose()}
|
||||
>
|
||||
×
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
.overlay[data-reach-dialog-overlay] {
|
||||
background: hsla(0, 0%, 0%, 0.8);
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
width: 450px;
|
||||
display: inline-block;
|
||||
|
|
|
@ -33,7 +33,10 @@ export function Modal({
|
|||
<Context.Provider value>
|
||||
<DialogOverlay
|
||||
isOpen
|
||||
className="flex items-center justify-center z-50"
|
||||
className={clsx(
|
||||
styles.overlay,
|
||||
'flex items-center justify-center z-50'
|
||||
)}
|
||||
onDismiss={onDismiss}
|
||||
role="dialog"
|
||||
>
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
import clsx from 'clsx';
|
||||
import { PropsWithChildren } from 'react';
|
||||
|
||||
import { useModalContext } from './Modal';
|
||||
import styles from './ModalFooter.module.css';
|
||||
|
||||
export function ModalFooter({ children }: PropsWithChildren<unknown>) {
|
||||
useModalContext();
|
||||
|
||||
return (
|
||||
<div className={clsx(styles.modalFooter, 'flex justify-end')}>
|
||||
{children}
|
||||
</div>
|
||||
<div className="flex justify-end gap-3 [&>*]:flex-1 pt-3">{children}</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ export function ModalHeader({ title, modalType }: Props) {
|
|||
/>
|
||||
)}
|
||||
{typeof title === 'string' ? (
|
||||
<h5 className="font-bold">{title}</h5>
|
||||
<h5 className="font-bold m-0">{title}</h5>
|
||||
) : (
|
||||
title
|
||||
)}
|
||||
|
|
|
@ -3,6 +3,8 @@ import { ModalHeader } from './ModalHeader';
|
|||
import { ModalBody } from './ModalBody';
|
||||
import { ModalFooter } from './ModalFooter';
|
||||
|
||||
export { ModalType, type OnSubmit } from './types';
|
||||
|
||||
interface WithSubComponents {
|
||||
Header: typeof ModalHeader;
|
||||
Body: typeof ModalBody;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue