How to reset the width and height % dynamically after plotling the view

Hi,

I have plotted the view with plotly react , now on some action i want to reduce the width of the plot… how do i do it?