#How to change prop based on breakpoints?

2 messages · Page 1 of 1 (latest)

peak aurora
#

for example tabs from horizontal to vertical?

The solution I see is something like this
<MediaQuery styles={highlight}>
<MyTabs />
</MediaQuery>

<MediaQuery largerThan="lg" >
<MyTabs orientation='horizontal' />
</MediaQuery>

but may be there is a better way?
https://codesandbox.io/s/elegant-merkle-8tjrsg?file=/src/App.tsx

elegant-merkle-8tjrsg by palecvnebo using @emotion/react, @mantine/carousel, @mantine/core, @mantine/dates, @mantine/dropzone, @mantine/form, @mantine/hooks, @mantine/modals, @mantine/notifications

craggy lagoon