mirror of https://github.com/portainer/portainer
fix(ui): remove right label for switch toggle EE-3786 (#7349)
* remove right label for switch togglepull/7447/head
parent
8ff2fa66b6
commit
ad8b8399c4
|
@ -13,6 +13,5 @@ export const switchField = r2a(SwitchField, [
|
|||
'disabled',
|
||||
'onChange',
|
||||
'featureId',
|
||||
'switchValues',
|
||||
'switchClass',
|
||||
]);
|
||||
|
|
|
@ -20,10 +20,6 @@ export interface Props {
|
|||
dataCy?: string;
|
||||
disabled?: boolean;
|
||||
featureId?: FeatureId;
|
||||
switchValues?: {
|
||||
on: string;
|
||||
off: string;
|
||||
};
|
||||
}
|
||||
|
||||
export function SwitchField({
|
||||
|
@ -37,7 +33,6 @@ export function SwitchField({
|
|||
disabled,
|
||||
onChange,
|
||||
featureId,
|
||||
switchValues,
|
||||
switchClass,
|
||||
}: Props) {
|
||||
const toggleName = name ? `toggle_${name}` : '';
|
||||
|
@ -64,16 +59,6 @@ export function SwitchField({
|
|||
featureId={featureId}
|
||||
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>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -71,7 +71,6 @@ export function EdgeScriptSettingsFieldset({
|
|||
}
|
||||
label="Allow self-signed certs"
|
||||
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"
|
||||
/>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue