I need to use my theme.spacing
in my sm
breakpoints, but no attempt is working.
sx={{
paddingTop: { sm: 0 },
paddingRight: { sm: "spacing(6)" },
paddingBottom: { sm: "spacing(10)" },
paddingLeft: { sm: "theme.spacing(6)" },
"@media screen and (orientation:landscape)": {
paddingTop: { sm: 0 },
paddingRight: { sm: "spacing(6)" },
paddingBottom: { sm: "spacing(2)" },
paddingLeft: { sm: "theme.spacing(6)" },
},
}}
or this
sx={{
paddingTop: { sm: 0 },
paddingRight: { sm: (theme) => theme.spacing(6) },
paddingBottom: { sm: (theme) => theme.spacing(10) },
paddingLeft: { sm: (theme) => theme.spacing(6) },
"@media screen and (orientation:landscape)": {
paddingTop: { sm: 0 },
paddingRight: { sm: (theme) => theme.spacing(6) },
paddingBottom: { sm: (theme) => theme.spacing(2) },
paddingLeft: { sm: (theme) => theme.spacing(6) },
},
}}
How can I use theme values with breakpoint (sm
, md
, lg
, etc)