1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

refactor(settings): migrate hidden containers panel to react [EE-5507] (#9119)

This commit is contained in:
Chaim Lev-Ari 2023-07-10 03:39:11 +07:00 committed by GitHub
parent eefb4c4287
commit 8b11e1678e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 230 additions and 139 deletions

View file

@ -2,10 +2,11 @@ import clsx from 'clsx';
import { ReactNode } from 'react';
interface Props {
children?: ReactNode;
children: ReactNode;
label: string;
colClassName?: string;
className?: string;
columns?: Array<ReactNode>;
}
export function DetailsRow({
@ -13,17 +14,21 @@ export function DetailsRow({
children,
colClassName,
className,
columns,
}: Props) {
return (
<tr className={className}>
<td className={clsx(colClassName, 'min-w-[150px] !break-normal')}>
{label}
</td>
{!!children && (
<td className={colClassName} data-cy={`detailsTable-${label}Value`}>
{children}
<td className={colClassName} data-cy={`detailsTable-${label}Value`}>
{children}
</td>
{columns?.map((column, index) => (
<td key={index} className={colClassName}>
{column}
</td>
)}
))}
</tr>
);
}