1
0
Fork 0
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:
Chaim Lev-Ari 2022-12-20 23:07:34 +02:00 committed by GitHub
parent b4a6f6911c
commit 7fe0712b61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
72 changed files with 988 additions and 1593 deletions

View file

@ -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()}
>
×

View file

@ -1,3 +1,7 @@
.overlay[data-reach-dialog-overlay] {
background: hsla(0, 0%, 0%, 0.8);
}
.modal-dialog {
width: 450px;
display: inline-block;

View file

@ -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"
>

View file

@ -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>
);
}

View file

@ -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
)}

View file

@ -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;