airbnb / lunar

🌗 React toolkit and design language for Airbnb open source and internal projects.
MIT License
464 stars 77 forks source link

update(Modal): Add optional zIndex to props #412

Closed nilgradisnik closed 3 years ago

nilgradisnik commented 3 years ago

to: @williaster @alecklandgraf

Description

Allow for optional zIndex to be passed to Modal.

Motivation and Context

We want to override z-index for Modals that are in a Lighbox component where a recent change increased the z-index https://github.com/airbnb/lunar/pull/411. This allows to bring such Modals to the front.

Testing

Tested in storybook

Screenshots

Screen Shot 2021-03-15 at 10 16 20 AM

Checklist

airbnb-bot commented 3 years ago

Size Changes

Package Diff ESM Prev ESM CJS Prev CJS
core +0.0% 570.87 KB 570.69 KB 715.98 KB 715.76 KB

Compared to master. File sizes are unminified and ungzipped.

View raw build stats

Previous (master)

{
  "apollo": {
    "esm": 10832,
    "lib": 14147
  },
  "app-shell": {
    "esm": 12906,
    "lib": 19874
  },
  "composer": {
    "esm": 68247,
    "lib": 101805
  },
  "core": {
    "esm": 584388,
    "lib": 732939
  },
  "forms": {
    "esm": 37350,
    "lib": 49298
  },
  "icons": {
    "esm": 156355,
    "lib": 205626
  },
  "layouts": {
    "esm": 15298,
    "lib": 20770
  },
  "metrics": {
    "esm": 5467,
    "lib": 7729
  },
  "test-utils": {
    "esm": 4279,
    "lib": 5937
  }
}

Current

{
  "apollo": {
    "esm": 10832,
    "lib": 14147
  },
  "app-shell": {
    "esm": 12906,
    "lib": 19874
  },
  "composer": {
    "esm": 68247,
    "lib": 101805
  },
  "core": {
    "esm": 584567,
    "lib": 733164
  },
  "forms": {
    "esm": 37350,
    "lib": 49298
  },
  "icons": {
    "esm": 156355,
    "lib": 205626
  },
  "layouts": {
    "esm": 15298,
    "lib": 20770
  },
  "metrics": {
    "esm": 5467,
    "lib": 7729
  },
  "test-utils": {
    "esm": 4279,
    "lib": 5937
  }
}