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