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:
parent
42c2a52a6b
commit
6c70049ecc
26 changed files with 143 additions and 62 deletions
|
@ -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}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue