Skip to content

Dim Background on Modal Display #12478

Closed
Closed
@RachelGreenberger

Description

Description

Expected default behavior of modals on mobile devices, is that on dispaly of the modal, the background page dims. Currently, the transparent property of the Modal component sets the background to either transparent or white. It would make more sense to have 3 options for background: transparent, white or rgba(0,0,0,0.5) - dim.

Reproduction

Default behavior of modal transparent property.

Solution

I was able to change the code that when transparent is false, it dims the background. However, it would be more correct to allow the user to select from a wider range of options.

backgroundColor: this.props.transparent ? 'transparent' : 'rgba(0,0,0,0.5)',

Dim Background on Modal Display

Additional Information

  • React Native version: Latest
  • Platform: Android
  • Operating System: MacOS

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions