siriwatknp / mui-treasury

A collection of ready-to-use components based on Material-UI
https://mui-treasury.com
MIT License
2.37k stars 153 forks source link

How to avoid the padding-right added to the body when sidebar is open? #1207

Closed gremo closed 1 year ago

gremo commented 1 year ago

I'm using the following configuration. Opening the leftEdgeSidebar when xs causes the body to shift because of the padding-right added. How to disable this feature?

import { Scheme } from '@mui-treasury/layout';

export const scheme: Scheme = {
  header: {
    config: {
      xs: { position: 'sticky', height: 56, clipped: true },
      md: { position: 'relative', height: 64, clipped: true }
    },
  },

  leftEdgeSidebar: {
    autoCollapse: 'lg',
    config: {
      xs: { variant: 'temporary', width: 256 },
      lg: {
        variant: 'permanent',
        width: 256,
        collapsible: true,
        collapsedWidth: 64,
        headerMagnetEnabled: true
      }
    },
  },
};
image
gremo commented 1 year ago

It turns out it's a Material-UI feature.