diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-08-30 16:13:09 -0700 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2023-08-30 16:13:09 -0700 |
commit | 8bc8dcc094cd21daec639ff8db5ebb08dc5fe92f (patch) | |
tree | 7149a00207c31f1288f7ac1248fb359ddb6054fd /src/view/com/util/layouts/Breakpoints.web.tsx | |
parent | 3fa9b6daba1950c79a69cd0806627e38a30cac6b (diff) | |
download | voidsky-8bc8dcc094cd21daec639ff8db5ebb08dc5fe92f.tar.zst |
Simplify the RecommendedFeeds with breakpoint components
Diffstat (limited to 'src/view/com/util/layouts/Breakpoints.web.tsx')
-rw-r--r-- | src/view/com/util/layouts/Breakpoints.web.tsx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/view/com/util/layouts/Breakpoints.web.tsx b/src/view/com/util/layouts/Breakpoints.web.tsx new file mode 100644 index 000000000..7031a1735 --- /dev/null +++ b/src/view/com/util/layouts/Breakpoints.web.tsx @@ -0,0 +1,20 @@ +import React from 'react' +import MediaQuery from 'react-responsive' + +export const Desktop = ({children}: React.PropsWithChildren<{}>) => ( + <MediaQuery minWidth={1224}>{children}</MediaQuery> +) +export const TabletOrDesktop = ({children}: React.PropsWithChildren<{}>) => ( + <MediaQuery minWidth={800}>{children}</MediaQuery> +) +export const Tablet = ({children}: React.PropsWithChildren<{}>) => ( + <MediaQuery minWidth={800} maxWidth={1224}> + {children} + </MediaQuery> +) +export const TabletOrMobile = ({children}: React.PropsWithChildren<{}>) => ( + <MediaQuery maxWidth={1224}>{children}</MediaQuery> +) +export const Mobile = ({children}: React.PropsWithChildren<{}>) => ( + <MediaQuery maxWidth={800}>{children}</MediaQuery> +) |