elm-street-technology / elevate-ui

🎨 💻 📱An opinionated toolkit of React components and patterns
https://elevate-ui.com/
MIT License
10 stars 4 forks source link

Add zIndex system, close #149 #150

Closed erwstout closed 5 years ago

erwstout commented 5 years ago

Looking for feedback on this. Usage example:

        const style = (theme) => ({
          modal: {
            zIndex: theme.zIndex['top']
          },
          mask: {
            zIndex: theme.zIndex['midTop']
          },
          elementUnderMask: {
            zIndex: theme.zIndex['mid']
          },
          evenLowerElement: {
            zIndex: theme.zIndex['bottomMid']
          },
          lowestElement: {
            zIndex: theme.zIndex['bottom'],
          },
        });

Inspired in part by how Material UI handles their zIndex values. (https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/styles/zIndex.js)