The different SUSI AI clients need to match in their feature set. One feature that was missing in the React JS SUSI Web Chat application was the ability for users to change the application wallpaper or background. This is how we implemented it on SUSI Web Chat.
Firstly we added a text field after the circle picker that change the color of the Application body. Because there should be a place to add the wallpaper image URL. Added that text field like this.
CirclePicker shows the circular color picker to choose the colors for each component of the application.
In ’TextField’ I have checked below condition whether to display or not to display the text field after the ‘body’ color picker.
To apply changes as soon as the user enters the image url, we refer the value of the ‘TextField’ and pass it into the ‘handleChangeBackgroundImage()’ function as ‘value’ on change like this.
In ‘‘handleChangeBackgroundImage()’ function we change the state of the application and background of the application like this.
In here ‘document.body.style.setProperty’ we change the style of the application’s ‘’ tag. This is how wallpapers are changing on SUSI Web Chat Application.
Refer Value from text field: https://stackoverflow.com/questions/43960183/material-ui-component-reference-does-not-work