1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 07:19: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

@ -17,6 +17,7 @@ export interface Props {
dataCy?: string;
// true if you want to always show the tooltip
visibleTooltip?: boolean;
disabled?: boolean;
}
export function Slider({
@ -27,6 +28,7 @@ export function Slider({
onChange,
dataCy,
visibleTooltip: visible,
disabled,
}: Props) {
const marks = {
[min]: visible && value / max < 0.1 ? '' : translateMinValue(min),
@ -34,14 +36,14 @@ export function Slider({
};
return (
<div className={styles.root}>
<div className={styles.root} data-cy={dataCy}>
<RcSlider
handleRender={visible ? sliderTooltip : undefined}
min={min}
max={max}
marks={marks}
step={step}
data-cy={dataCy}
disabled={disabled}
value={value}
onChange={onChange}
/>