Questions tagged [sx]

19 questions
0
votes
1 answer

problem while importing dynamic images to url in react

I am making a react project, where I want to import the set of images from a data.tsx file such that it should set inside the backgroundImage url of the element in which the 'data' is mapped into. But, my images are not visible as the background…
Himanshu Sharma
  • 315
  • 2
  • 9
0
votes
1 answer

Using MUI v5 sx Prop to Set CSS Property with Multiple Values (e.g. margin, border-radius, etc...)

Is there a cleaner way to write the following that takes advantage of the sx prop's access to spacing units? Something like this? I…
Ric Donati
  • 25
  • 5
0
votes
1 answer

Is it appropriate to appy condition inside SX Props in Material Ui Component?

My target is to change the UI of Nav Component based on history.location.pathName. So I have written a function named UI and this function call another function BoxPadding based on location. BoxPadding function receives a function and returns some…
0
votes
1 answer

MUI5 sx prop behavior

I'm playing with Material UI 5 sx props just out of curiosity and can't understand how to make it similar to the previous MUI 4 makeStyles fn. I'm trying to pass JSS classnemaes to sx props. So in this code snippet, I want to overwrite the color…
1
2