1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 21:39:40 +02:00
portainer/app/react/components/datatables/TableContainer.tsx
Chaim Lev-Ari d336a14e50
Some checks failed
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
ci / build_images (map[arch:arm platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:s390x platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Has been cancelled
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
/ triage (push) Has been cancelled
Lint / Run linters (push) Has been cancelled
Test / test-client (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:linux]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Has been cancelled
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Has been cancelled
Test / test-server (map[arch:arm64 platform:linux]) (push) Has been cancelled
ci / build_manifests (push) Has been cancelled
feat(docker/services): show port ranges [EE-4012] (#10657)
2024-03-27 09:56:00 +02:00

35 lines
825 B
TypeScript

import { PropsWithChildren } from 'react';
import { Widget, WidgetBody } from '@@/Widget';
interface Props {
// workaround to remove the widget, ideally we should have a different component to wrap the table with a widget
noWidget?: boolean;
'aria-label'?: string;
}
export function TableContainer({
children,
noWidget = false,
'aria-label': ariaLabel,
}: PropsWithChildren<Props>) {
if (noWidget) {
return (
<section className="datatable" aria-label={ariaLabel}>
{children}
</section>
);
}
return (
<div className="row">
<div className="col-sm-12">
<div className="datatable">
<Widget aria-label={ariaLabel}>
<WidgetBody className="no-padding">{children}</WidgetBody>
</Widget>
</div>
</div>
</div>
);
}