What would be the best (I'd be interested even in 2nd best) approach to make a component define some sx
style that applies only starting from particular breakpoint?
<MyComponent
transition="1s"
sx={{
...
transform: 'translateY(-100%)',
...
}}
>
{componentContent}
</MyComponent>
In the example above everything inside sx
should be applied only to lg+
breakpoints (targeting Desktop) and nothing should be applied to lower breakpoints (mobile/tablet).
As far as I understand there is a way around my issue with using useBreakpointValue
to manually check whether the breakpoint is the one where i apply the style or not, but I'm wondering if there is a better approach to achieve the result