fix(ui): remove right label for switch toggle EE-3786 (#7349)

* remove right label for switch toggle
pull/7447/head
Richard Wei 2022-08-08 16:43:31 +12:00 committed by GitHub
parent 8ff2fa66b6
commit ad8b8399c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 17 deletions

View File

@ -13,6 +13,5 @@ export const switchField = r2a(SwitchField, [
'disabled', 'disabled',
'onChange', 'onChange',
'featureId', 'featureId',
'switchValues',
'switchClass', 'switchClass',
]); ]);

View File

@ -20,10 +20,6 @@ export interface Props {
dataCy?: string; dataCy?: string;
disabled?: boolean; disabled?: boolean;
featureId?: FeatureId; featureId?: FeatureId;
switchValues?: {
on: string;
off: string;
};
} }
export function SwitchField({ export function SwitchField({
@ -37,7 +33,6 @@ export function SwitchField({
disabled, disabled,
onChange, onChange,
featureId, featureId,
switchValues,
switchClass, switchClass,
}: Props) { }: Props) {
const toggleName = name ? `toggle_${name}` : ''; const toggleName = name ? `toggle_${name}` : '';
@ -64,16 +59,6 @@ export function SwitchField({
featureId={featureId} featureId={featureId}
dataCy={dataCy} dataCy={dataCy}
/> />
{switchValues && checked && (
<span className={`"ml-2" ${styles.switchValues}`}>
{switchValues.on}
</span>
)}
{switchValues && !checked && (
<span className={`"ml-2" ${styles.switchValues}`}>
{switchValues.off}
</span>
)}
</label> </label>
); );
} }

View File

@ -71,7 +71,6 @@ export function EdgeScriptSettingsFieldset({
} }
label="Allow self-signed certs" label="Allow self-signed certs"
labelClass="col-sm-3 col-lg-2" labelClass="col-sm-3 col-lg-2"
switchValues={{ on: 'Yes', off: 'No' }}
tooltip="When allowing self-signed certificates the edge agent will ignore the domain validation when connecting to Portainer via HTTPS" tooltip="When allowing self-signed certificates the edge agent will ignore the domain validation when connecting to Portainer via HTTPS"
/> />
</div> </div>