More layouts
This commit is contained in:
@@ -30,7 +30,7 @@ export function EmojiPickerButton() {
|
||||
|
||||
return (
|
||||
<DropdownMenu.Root open={open} onOpenChange={onOpenChange}>
|
||||
<DropdownMenu.Trigger style={styles.trigger}>
|
||||
<DropdownMenu.Trigger style={styles.trigger as React.CSSProperties}>
|
||||
<FontAwesomeIcon
|
||||
icon={['far', 'face-smile']}
|
||||
color={pal.colors.link}
|
||||
@@ -87,7 +87,8 @@ export function EmojiPicker({close}: {close: () => void}) {
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
mask: {
|
||||
position: 'absolute',
|
||||
// @ts-ignore web ony
|
||||
position: 'fixed',
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
@@ -96,6 +97,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
trigger: {
|
||||
backgroundColor: 'transparent',
|
||||
// @ts-ignore web only
|
||||
border: 'none',
|
||||
paddingTop: 4,
|
||||
paddingLeft: 12,
|
||||
|
||||
@@ -12,6 +12,7 @@ import {TabBar} from './TabBar'
|
||||
import {OnScrollHandler} from 'lib/hooks/useOnMainScroll'
|
||||
import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback'
|
||||
import {usePalette} from '#/lib/hooks/usePalette'
|
||||
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
||||
|
||||
const SCROLLED_DOWN_LIMIT = 200
|
||||
|
||||
@@ -152,12 +153,20 @@ let PagerTabBar = ({
|
||||
onSelect?: (index: number) => void
|
||||
}): React.ReactNode => {
|
||||
const pal = usePalette('default')
|
||||
const {isMobile} = useWebMediaQueries()
|
||||
return (
|
||||
<>
|
||||
<View style={[styles.headerContainer, pal.border]}>
|
||||
<View style={[!isMobile && styles.headerContainerDesktop, pal.border]}>
|
||||
{renderHeader?.()}
|
||||
</View>
|
||||
<View style={[styles.tabBarContainer, pal.border]}>
|
||||
<View
|
||||
style={[
|
||||
styles.tabBarContainer,
|
||||
isMobile
|
||||
? styles.tabBarContainerMobile
|
||||
: styles.tabBarContainerDesktop,
|
||||
pal.border,
|
||||
]}>
|
||||
<TabBar
|
||||
testID={testID}
|
||||
items={items}
|
||||
@@ -202,7 +211,7 @@ function PagerItem({
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
headerContainer: {
|
||||
headerContainerDesktop: {
|
||||
marginLeft: 'auto',
|
||||
marginRight: 'auto',
|
||||
width: 600,
|
||||
@@ -215,12 +224,18 @@ const styles = StyleSheet.create({
|
||||
overflow: 'hidden',
|
||||
top: 0,
|
||||
zIndex: 1,
|
||||
},
|
||||
tabBarContainerDesktop: {
|
||||
marginLeft: 'auto',
|
||||
marginRight: 'auto',
|
||||
width: 600,
|
||||
borderLeftWidth: 1,
|
||||
borderRightWidth: 1,
|
||||
},
|
||||
tabBarContainerMobile: {
|
||||
paddingLeft: 14,
|
||||
paddingRight: 14,
|
||||
},
|
||||
})
|
||||
|
||||
function noop() {
|
||||
|
||||
@@ -64,7 +64,8 @@ export function show(text: string, icon: FontAwesomeProps['icon'] = 'check') {
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
position: 'absolute',
|
||||
// @ts-ignore web only
|
||||
position: 'fixed',
|
||||
left: 20,
|
||||
bottom: 20,
|
||||
// @ts-ignore web only
|
||||
|
||||
Reference in New Issue
Block a user