azouaoui-med / react-pro-sidebar

React Pro Sidebar provides a set of components for creating high level and customizable side navigation
https://azouaoui-med.github.io/react-pro-sidebar/
MIT License
1.72k stars 412 forks source link

Can't decrease sidebar width below 250px #217

Closed Neuro8 closed 4 months ago

Neuro8 commented 7 months ago

Describe the bug

It is possible to increase the sidebar width above 250px without problem. However, when using rootStyles props and trying to decrease the sidebar width below 250px, only the color display will decrease in width but the sidebar object pushing onto other component get stuck at 250px. This can be seen with the default border that creates a vertical line representing the true border of the sidebar that won't go below 250px

To Reproduce Just pass a width < 250px to the rootStyles as such :

return (
    <Sidebar
     rootStyles={{
        [`.${sidebarClasses.container}`]: {
          width: 200,            
        },
      }}

    >

Expected behavior It would be nice if the sidebar object did not have that minimum width of 250px

azouaoui-med commented 6 months ago

Sidebar component exposes a prop width that deals with that

use <Sidebar width="200px" instead

please refer to the docs / API for more details

stale[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.