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

fix(service): service related UI issues [EE-4062] (#7943)

This commit is contained in:
Chamhaw 2023-05-25 11:59:32 +08:00 committed by GitHub
parent 93866644c6
commit a2f734051c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 136 additions and 98 deletions

View file

@ -13,8 +13,9 @@ export interface Props {
checked: boolean;
id: string;
name: string;
onChange(checked: boolean): void;
onChange(checked: boolean, index?: number): void;
index?: number;
className?: string;
dataCy?: string;
disabled?: boolean;
@ -28,6 +29,7 @@ export function Switch({
disabled,
dataCy,
onChange,
index,
featureId,
className,
}: Props) {
@ -47,7 +49,7 @@ export function Switch({
id={id}
checked={checked}
disabled={disabled || limitedToBE}
onChange={({ target: { checked } }) => onChange(checked)}
onChange={({ target: { checked } }) => onChange(checked, index)}
/>
<span className="slider round before:content-['']" data-cy={dataCy} />
</label>