design-system-react
design-system-react copied to clipboard
Feature request: SLDS Modal props for width, scrolling, padding
there are currently two modal sizes in SLDS:
- regular: width 50%, max-width 40rem
- large: width 90%, no max-width
The regular size is too narrow for our "Edit Component" dialog, the large size is too wide.
I was able to get the desired design by having a modal of size large and overriding the following css props:
.slds-modal__container
max-width 40rem 50rem
.slds-modal__content
padding 1rem 0
height 75% (to get a scrollbar in the sidebar child)
overflow hidden (to hide scrollbar in the modal body)
Maybe these styles could be exposed as SLDSModal react properties? E.g. padding: Y/N, scrolling: Y/N, max-width: rem
Moving to: #614