swordev / suid

A port of Material-UI (MUI) built with SolidJS.
https://suid.io
MIT License
673 stars 48 forks source link

Breakpoints, how do I use them? #229

Closed Industrial closed 1 year ago

Industrial commented 1 year ago
      sx={{
        paddingTop: (theme) => {
          return {
            [theme.breakpoints.up('sm')]: theme.spacing(2),
          }
          // theme.breakpoints.up('sm')
          //   paddingTop: theme.spacing(2),
          // },
          // [theme.breakpoints.up('md')]: {
          //   paddingTop: theme.spacing(4),
          // },
          // return theme.spacing(1)
        },
      }}

I'm used to the sx property taking a theme function, so I'm not sure how to do this.

juanrgm commented 1 year ago
<Box sx={{ paddingTop: { sm: 2 } }} />