1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 22:39:41 +02:00

feat(kube): add a11y props for smoke tests [EE-6747] (#11263)

This commit is contained in:
Chaim Lev-Ari 2024-02-29 09:26:13 +02:00 committed by GitHub
parent 42c2a52a6b
commit 6c70049ecc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 143 additions and 62 deletions

View file

@ -5,24 +5,30 @@ 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 <div className="datatable">{children}</div>;
return (
<section className="datatable" aria-label={ariaLabel}>
{children}
</section>
);
}
return (
<div className="row">
<div className="col-sm-12">
<div className="datatable">
<section className="datatable" aria-label={ariaLabel}>
<Widget>
<WidgetBody className="no-padding">{children}</WidgetBody>
</Widget>
</div>
</section>
</div>
</div>
);