fix types
This commit is contained in:
+2
-2
@@ -951,8 +951,8 @@ export const atoms = {
|
||||
userSelect: 'all',
|
||||
},
|
||||
outline_inset_1: {
|
||||
outlineOffset: '-1px',
|
||||
} as StyleProp<ViewStyle>,
|
||||
outlineOffset: -1,
|
||||
},
|
||||
|
||||
/*
|
||||
* Text decoration
|
||||
|
||||
@@ -118,7 +118,7 @@ import {LazyQuoteEmbed, QuoteX} from '#/view/com/util/post-embeds/QuoteEmbed'
|
||||
import {Text} from '#/view/com/util/text/Text'
|
||||
import * as Toast from '#/view/com/util/Toast'
|
||||
import {UserAvatar} from '#/view/com/util/UserAvatar'
|
||||
import {atoms as a, native, useTheme} from '#/alf'
|
||||
import {atoms as a, native, useTheme, web} from '#/alf'
|
||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||
import {useDialogControl} from '#/components/Dialog'
|
||||
import {VerifyEmailDialog} from '#/components/dialogs/VerifyEmailDialog'
|
||||
@@ -1515,10 +1515,10 @@ const styles = StyleSheet.create({
|
||||
paddingVertical: 6,
|
||||
marginLeft: 12,
|
||||
},
|
||||
stickyFooterWeb: {
|
||||
stickyFooterWeb: web({
|
||||
position: 'sticky',
|
||||
bottom: 0,
|
||||
},
|
||||
}),
|
||||
errorLine: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
|
||||
@@ -15,7 +15,7 @@ import {sanitizeHandle} from '#/lib/strings/handles'
|
||||
import {type ComposerOptsPostRef} from '#/state/shell/composer'
|
||||
import {MaybeQuoteEmbed} from '#/view/com/util/post-embeds/QuoteEmbed'
|
||||
import {PreviewableUserAvatar} from '#/view/com/util/UserAvatar'
|
||||
import {atoms as a, useTheme} from '#/alf'
|
||||
import {atoms as a, useTheme, web} from '#/alf'
|
||||
import {Text} from '#/components/Typography'
|
||||
import {useSimpleVerificationState} from '#/components/verification'
|
||||
import {VerificationCheck} from '#/components/verification/VerificationCheck'
|
||||
@@ -76,7 +76,7 @@ export function ComposerReplyTo({replyTo}: {replyTo: ComposerOptsPostRef}) {
|
||||
a.mx_lg,
|
||||
a.border_b,
|
||||
t.atoms.border_contrast_medium,
|
||||
a.user_select_text,
|
||||
web(a.user_select_text),
|
||||
]}
|
||||
onPress={onPress}
|
||||
accessibilityRole="button"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {useCallback, useEffect, useRef} from 'react'
|
||||
import {ScrollView, StyleSheet, View} from 'react-native'
|
||||
import {type ScrollView, StyleSheet, View} from 'react-native'
|
||||
|
||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||
import {atoms as a, useBreakpoints, useTheme, web} from '#/alf'
|
||||
import {Text} from '#/components/Typography'
|
||||
import {PressableWithHover} from '../util/PressableWithHover'
|
||||
import {DraggableScrollView} from './DraggableScrollView'
|
||||
@@ -161,7 +161,7 @@ const desktopStyles = StyleSheet.create({
|
||||
},
|
||||
itemInner: {
|
||||
alignItems: 'center',
|
||||
overflowX: 'hidden',
|
||||
...web({overflowX: 'hidden'}),
|
||||
},
|
||||
itemText: {
|
||||
textAlign: 'center',
|
||||
@@ -204,7 +204,7 @@ const mobileStyles = StyleSheet.create({
|
||||
itemInner: {
|
||||
flexGrow: 1,
|
||||
alignItems: 'center',
|
||||
overflowX: 'hidden',
|
||||
...web({overflowX: 'hidden'}),
|
||||
},
|
||||
itemText: {
|
||||
textAlign: 'center',
|
||||
|
||||
@@ -239,7 +239,6 @@ const getKey = (label: string, index: number, id?: string) => {
|
||||
return `${label}_${index}`
|
||||
}
|
||||
|
||||
// @ts-expect-error - web only styles. the only style that should be broken here is `outline`
|
||||
const styles = StyleSheet.create({
|
||||
separator: {
|
||||
height: 1,
|
||||
@@ -264,7 +263,6 @@ const styles = StyleSheet.create({
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
columnGap: 20,
|
||||
// @ts-ignore -web
|
||||
cursor: 'pointer',
|
||||
paddingTop: 8,
|
||||
paddingBottom: 8,
|
||||
@@ -273,6 +271,7 @@ const styles = StyleSheet.create({
|
||||
borderRadius: 8,
|
||||
fontFamily:
|
||||
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Liberation Sans", Helvetica, Arial, sans-serif',
|
||||
// @ts-expect-error web only
|
||||
outline: 0,
|
||||
border: 0,
|
||||
},
|
||||
|
||||
@@ -12,9 +12,8 @@ import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
||||
import {clamp} from '#/lib/numbers'
|
||||
import {useGate} from '#/lib/statsig/statsig'
|
||||
import {colors} from '#/lib/styles'
|
||||
import {isWeb} from '#/platform/detection'
|
||||
import {useSession} from '#/state/session'
|
||||
import {useLayoutBreakpoints} from '#/alf'
|
||||
import {atoms as a, useLayoutBreakpoints} from '#/alf'
|
||||
|
||||
export function LoadLatestBtn({
|
||||
onPress,
|
||||
@@ -80,7 +79,7 @@ export function LoadLatestBtn({
|
||||
const styles = StyleSheet.create({
|
||||
loadLatest: {
|
||||
zIndex: 20,
|
||||
position: isWeb ? 'fixed' : 'absolute',
|
||||
...a.fixed,
|
||||
left: 18,
|
||||
borderWidth: StyleSheet.hairlineWidth,
|
||||
width: 52,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import {StyleSheet} from 'react-native'
|
||||
|
||||
import {colors} from '#/lib/styles'
|
||||
import {atoms as a} from '#/alf'
|
||||
|
||||
export const styles = StyleSheet.create({
|
||||
bottomBar: {
|
||||
@@ -13,9 +14,7 @@ export const styles = StyleSheet.create({
|
||||
paddingLeft: 5,
|
||||
paddingRight: 10,
|
||||
},
|
||||
bottomBarWeb: {
|
||||
position: 'fixed',
|
||||
},
|
||||
bottomBarWeb: a.fixed,
|
||||
ctrl: {
|
||||
flex: 1,
|
||||
paddingTop: 13,
|
||||
|
||||
@@ -32,7 +32,7 @@ import {LoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
|
||||
import {PressableWithHover} from '#/view/com/util/PressableWithHover'
|
||||
import {UserAvatar} from '#/view/com/util/UserAvatar'
|
||||
import {NavSignupCard} from '#/view/shell/NavSignupCard'
|
||||
import {atoms as a, tokens, useLayoutBreakpoints, useTheme} from '#/alf'
|
||||
import {atoms as a, tokens, useLayoutBreakpoints, useTheme, web} from '#/alf'
|
||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||
import {type DialogControlProps} from '#/components/Dialog'
|
||||
import {ArrowBoxLeft_Stroke2_Corner0_Rounded as LeaveIcon} from '#/components/icons/ArrowBoxLeft'
|
||||
@@ -718,7 +718,7 @@ export function DesktopLeftNav() {
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
leftNav: {
|
||||
position: 'fixed',
|
||||
...a.fixed,
|
||||
top: 0,
|
||||
paddingTop: 10,
|
||||
paddingBottom: 10,
|
||||
@@ -736,7 +736,7 @@ const styles = StyleSheet.create({
|
||||
height: '100%',
|
||||
width: 86,
|
||||
alignItems: 'center',
|
||||
overflowX: 'hidden',
|
||||
...web({overflowX: 'hidden'}),
|
||||
},
|
||||
backBtn: {
|
||||
position: 'absolute',
|
||||
|
||||
@@ -8,7 +8,7 @@ import {RemoveScrollBar} from 'react-remove-scroll-bar'
|
||||
import {useColorSchemeStyle} from '#/lib/hooks/useColorSchemeStyle'
|
||||
import {useIntentHandler} from '#/lib/hooks/useIntentHandler'
|
||||
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
||||
import {NavigationProp} from '#/lib/routes/types'
|
||||
import {type NavigationProp} from '#/lib/routes/types'
|
||||
import {colors} from '#/lib/styles'
|
||||
import {useIsDrawerOpen, useSetDrawerOpen} from '#/state/shell'
|
||||
import {useComposerKeyboardShortcut} from '#/state/shell/composer/useComposerKeyboardShortcut'
|
||||
@@ -130,7 +130,7 @@ const styles = StyleSheet.create({
|
||||
backgroundColor: colors.black, // TODO
|
||||
},
|
||||
drawerMask: {
|
||||
position: 'fixed',
|
||||
...a.fixed,
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
top: 0,
|
||||
@@ -138,7 +138,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
drawerContainer: {
|
||||
display: 'flex',
|
||||
position: 'fixed',
|
||||
...a.fixed,
|
||||
top: 0,
|
||||
left: 0,
|
||||
height: '100%',
|
||||
|
||||
Reference in New Issue
Block a user