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

feat(k8sconfigure): migrate configure to react [EE-5524] (#10218)

This commit is contained in:
Ali 2023-09-05 18:06:36 +02:00 committed by GitHub
parent 0f1e77a6d5
commit 515b02813b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 1819 additions and 833 deletions

View file

@ -1,6 +1,6 @@
import clsx from 'clsx';
import { ComponentProps } from 'react';
import uuid from 'uuid';
import { ComponentProps, PropsWithChildren, ReactNode } from 'react';
import { FeatureId } from '@/react/portainer/feature-flags/enums';
@ -24,6 +24,7 @@ export interface Props {
dataCy?: string;
disabled?: boolean;
featureId?: FeatureId;
valueExplanation?: ReactNode;
}
export function SwitchField({
@ -40,7 +41,8 @@ export function SwitchField({
featureId,
switchClass,
setTooltipHtmlMessage,
}: Props) {
valueExplanation,
}: PropsWithChildren<Props>) {
const toggleName = name ? `toggle_${name}` : '';
return (
@ -65,6 +67,7 @@ export function SwitchField({
featureId={featureId}
dataCy={dataCy}
/>
{valueExplanation && <span>{valueExplanation}</span>}
</div>
);
}