In my React JS application I have a component and I want to set a mobile breakpoint based on a variable:
const Component = ({size}) => { return ( hello) }
I want to add something like [size]:flex
where md:flex
will set a breakpoint based on that property. (eg: if the size is 500px or 100px or 900px, set it to display flex)
Question: Is it possible to set media queries the way I described above?
You can useclassnamesnpm package: