design-system-react icon indicating copy to clipboard operation
design-system-react copied to clipboard

Feature request: SLDS Modal props for width, scrolling, padding

Open minevskiy opened this issue 10 years ago • 1 comments

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

minevskiy avatar Feb 09 '16 23:02 minevskiy

Moving to: #614

interactivellama avatar Aug 23 '16 16:08 interactivellama