From 15e2d3a29b0d1a304965e34f114a911e5a7abdb3 Mon Sep 17 00:00:00 2001
From: sai-neetha <sai-neetha.phulmali@highstreet-technologies.com>
Date: Mon, 20 Mar 2023 08:05:47 +0100
Subject: Odlux Update

Add eslint and custom icons update

Issue-ID: CCSDK-3871
Signed-off-by: sai-neetha <sai-neetha.phulmali@highstreet-technologies.com>
Change-Id: If6b676128cc9cff0437a5dc54f85eaafd3b8c586
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
---
 .../src/components/uiElementSelection.tsx          | 51 +++++++++++++---------
 1 file changed, 30 insertions(+), 21 deletions(-)

(limited to 'sdnr/wt/odlux/apps/configurationApp/src/components/uiElementSelection.tsx')

diff --git a/sdnr/wt/odlux/apps/configurationApp/src/components/uiElementSelection.tsx b/sdnr/wt/odlux/apps/configurationApp/src/components/uiElementSelection.tsx
index fdf803419..ebd04dab4 100644
--- a/sdnr/wt/odlux/apps/configurationApp/src/components/uiElementSelection.tsx
+++ b/sdnr/wt/odlux/apps/configurationApp/src/components/uiElementSelection.tsx
@@ -16,45 +16,54 @@
  * ============LICENSE_END==========================================================================
  */
 
-import * as React from 'react';
+import React from 'react';
 import { BaseProps } from './baseProps';
-import { ViewElementSelection } from '../models/uiModels'
+import { ViewElementSelection } from '../models/uiModels';
 import { FormControl, InputLabel, Select, FormHelperText, MenuItem, Tooltip } from '@mui/material';
 
 type selectionProps = BaseProps;
 
 export const UiElementSelection = (props: selectionProps) => {
 
-    const element = props.value as ViewElementSelection;
+  const element = props.value as ViewElementSelection;
 
-    let error = "";
-    const value = String(props.inputValue);
-    if (element.mandatory && Boolean(!value)) {
-        error = "Error";
-    }
+  let error = '';
+  const value = String(props.inputValue);
+  if (element.mandatory && Boolean(!value)) {
+    error = 'Error';
+  }
 
-    return (props.readOnly || props.inputValue != null
-        ? (<FormControl variant="standard" style={{ width: 485, marginLeft: 20, marginRight: 20 }}>
-            <InputLabel htmlFor={`select-${element.id}`} >{element.label}</InputLabel>
+  return (props.readOnly || props.inputValue != null
+    ? (<FormControl variant="standard" style={{ width: 485, marginLeft: 20, marginRight: 20 }}>
+         <InputLabel htmlFor={`select-${element.id}`} >{element.label}</InputLabel>
             <Select variant="standard"
                 required={!!element.mandatory}
                 error={!!error}
-                onChange={(e) => { props.onChange(e.target.value as string) }}
+                onChange={(e) => { props.onChange(e.target.value as string); }}
                 readOnly={props.readOnly}
                 disabled={props.disabled}
                 value={value.toString()}
-                aria-label={element.label+'-selection'}
+                aria-label={element.label + '-selection'}
                 inputProps={{
-                    name: element.id,
-                    id: `select-${element.id}`,
+                  name: element.id,
+                  id: `select-${element.id}`,
                 }}
             >
-          {element.options.map(option => (
-            <MenuItem key={option.key} value={option.key} aria-label={option.key}><Tooltip disableInteractive title={option.description || '' }><div style={{width:"100%"}}>{option.key}</div></Tooltip></MenuItem>
-          ))}
+                {element.options.map(option => (
+                    <MenuItem
+                        key={option.key}
+                        value={option.key}
+                        aria-label={option.key}>
+                        <Tooltip disableInteractive title={option.description || ''}>
+                            <div style={{ width: '100%' }}>
+                                {option.key}
+                            </div>
+                        </Tooltip>
+                    </MenuItem>
+                ))}
             </Select>
             <FormHelperText>{error}</FormHelperText>
         </FormControl>)
-        : null
-    );
-}
\ No newline at end of file
+    : null
+  );
+};
\ No newline at end of file
-- 
cgit 1.2.3-korg

