diff --git a/src/components/AccountList.tsx b/src/components/AccountList.tsx
index 2a261ddf85..68bb482af2 100644
--- a/src/components/AccountList.tsx
+++ b/src/components/AccountList.tsx
@@ -7,9 +7,9 @@ import {useProfileQuery} from '#/state/queries/profile'
import {type SessionAccount, useSession} from '#/state/session'
import {UserAvatar} from '#/view/com/util/UserAvatar'
import {atoms as a, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check'
import {ChevronRight_Stroke2_Corner0_Rounded as Chevron} from '#/components/icons/Chevron'
+import {Button} from './Button'
import {Text} from './Typography'
export function AccountList({
@@ -51,19 +51,19 @@ export function AccountList({
))}
-
- {({pressed}) => (
+ {({hovered, pressed}) => (
)}
-
+
)
}
@@ -103,7 +103,7 @@ function AccountItem({
}, [account, onSelect])
return (
-
- {({pressed}) => (
+ {({hovered, pressed}) => (
@@ -143,6 +143,6 @@ function AccountItem({
)}
)}
-
+
)
}
diff --git a/src/components/BottomSheetButton.tsx b/src/components/BottomSheetButton.tsx
index 3909cb3e24..e69de29bb2 100644
--- a/src/components/BottomSheetButton.tsx
+++ b/src/components/BottomSheetButton.tsx
@@ -1,12 +0,0 @@
-import React from 'react'
-
-import {Button, ButtonProps} from '#/components/Button'
-import {NormalizedRNGHPressable} from '#/components/NormalizedRNGHPressable'
-
-export function BottomSheetButton({children, ...rest}: ButtonProps) {
- return (
-
- )
-}
diff --git a/src/components/BottomSheetButton.web.tsx b/src/components/BottomSheetButton.web.tsx
deleted file mode 100644
index c3752a03e4..0000000000
--- a/src/components/BottomSheetButton.web.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-import {Button as BottomSheetButton} from '#/components/Button'
-
-export {BottomSheetButton}
diff --git a/src/components/Button.tsx b/src/components/Button.tsx
index 693ac109ce..9483089072 100644
--- a/src/components/Button.tsx
+++ b/src/components/Button.tsx
@@ -15,7 +15,9 @@ import {
import {LinearGradient} from 'expo-linear-gradient'
import {atoms as a, flatten, select, tokens, useTheme, web} from '#/alf'
+import {useDialogContext} from '#/components/Dialog'
import {Props as SVGIconProps} from '#/components/icons/common'
+import {NormalizedRNGHPressable} from '#/components/NormalizedRNGHPressable'
import {Text} from '#/components/Typography'
export type ButtonVariant = 'solid' | 'outline' | 'ghost' | 'gradient'
@@ -90,8 +92,7 @@ export type ButtonProps = Pick<
PressableComponent?: React.ComponentType
}
-export type ButtonTextProps = TextProps &
- VariantProps & {disabled?: boolean | null}
+export type ButtonTextProps = TextProps & VariantProps & {disabled?: boolean}
const Context = React.createContext({
hovered: false,
@@ -99,7 +100,6 @@ const Context = React.createContext({
pressed: false,
disabled: false,
})
-export const ButtonContext = Context
export function useButtonContext() {
return React.useContext(Context)
@@ -122,6 +122,18 @@ export const Button = React.forwardRef(
},
ref,
) => {
+ // This will pick the correct default pressable to use. If we are inside a dialog, we need to use the RNGH
+ // pressable so that it is usable inside the dialog.
+ const {insideDialog} = useDialogContext()
+ if (!PressableComponent) {
+ if (insideDialog) {
+ PressableComponent = NormalizedRNGHPressable
+ } else {
+ PressableComponent = Pressable
+ }
+ }
+
+ const t = useTheme()
const [state, setState] = React.useState({
pressed: false,
hovered: false,
@@ -185,13 +197,226 @@ export const Button = React.forwardRef(
}))
}, [setState])
- const {baseStyles, hoverStyles} = useSharedButtonStyles({
- color,
- variant,
- disabled,
- shape,
- size,
- })
+ const {baseStyles, hoverStyles} = React.useMemo(() => {
+ const baseStyles: ViewStyle[] = []
+ const hoverStyles: ViewStyle[] = []
+
+ if (color === 'primary') {
+ if (variant === 'solid') {
+ if (!disabled) {
+ baseStyles.push({
+ backgroundColor: t.palette.primary_500,
+ })
+ hoverStyles.push({
+ backgroundColor: t.palette.primary_600,
+ })
+ } else {
+ baseStyles.push({
+ backgroundColor: select(t.name, {
+ light: t.palette.primary_700,
+ dim: t.palette.primary_300,
+ dark: t.palette.primary_300,
+ }),
+ })
+ }
+ } else if (variant === 'outline') {
+ baseStyles.push(a.border, t.atoms.bg, {
+ borderWidth: 1,
+ })
+
+ if (!disabled) {
+ baseStyles.push(a.border, {
+ borderColor: t.palette.primary_500,
+ })
+ hoverStyles.push(a.border, {
+ backgroundColor: t.palette.primary_50,
+ })
+ } else {
+ baseStyles.push(a.border, {
+ borderColor: t.palette.primary_200,
+ })
+ }
+ } else if (variant === 'ghost') {
+ if (!disabled) {
+ baseStyles.push(t.atoms.bg)
+ hoverStyles.push({
+ backgroundColor: t.palette.primary_100,
+ })
+ }
+ }
+ } else if (color === 'secondary') {
+ if (variant === 'solid') {
+ if (!disabled) {
+ baseStyles.push(t.atoms.bg_contrast_25)
+ hoverStyles.push(t.atoms.bg_contrast_50)
+ } else {
+ baseStyles.push(t.atoms.bg_contrast_100)
+ }
+ } else if (variant === 'outline') {
+ baseStyles.push(a.border, t.atoms.bg, {
+ borderWidth: 1,
+ })
+
+ if (!disabled) {
+ baseStyles.push(a.border, {
+ borderColor: t.palette.contrast_300,
+ })
+ hoverStyles.push(t.atoms.bg_contrast_50)
+ } else {
+ baseStyles.push(a.border, {
+ borderColor: t.palette.contrast_200,
+ })
+ }
+ } else if (variant === 'ghost') {
+ if (!disabled) {
+ baseStyles.push(t.atoms.bg)
+ hoverStyles.push({
+ backgroundColor: t.palette.contrast_25,
+ })
+ }
+ }
+ } else if (color === 'secondary_inverted') {
+ if (variant === 'solid') {
+ if (!disabled) {
+ baseStyles.push({
+ backgroundColor: t.palette.contrast_900,
+ })
+ hoverStyles.push({
+ backgroundColor: t.palette.contrast_950,
+ })
+ } else {
+ baseStyles.push({
+ backgroundColor: t.palette.contrast_600,
+ })
+ }
+ } else if (variant === 'outline') {
+ baseStyles.push(a.border, t.atoms.bg, {
+ borderWidth: 1,
+ })
+
+ if (!disabled) {
+ baseStyles.push(a.border, {
+ borderColor: t.palette.contrast_300,
+ })
+ hoverStyles.push(t.atoms.bg_contrast_50)
+ } else {
+ baseStyles.push(a.border, {
+ borderColor: t.palette.contrast_200,
+ })
+ }
+ } else if (variant === 'ghost') {
+ if (!disabled) {
+ baseStyles.push(t.atoms.bg)
+ hoverStyles.push({
+ backgroundColor: t.palette.contrast_25,
+ })
+ }
+ }
+ } else if (color === 'negative') {
+ if (variant === 'solid') {
+ if (!disabled) {
+ baseStyles.push({
+ backgroundColor: t.palette.negative_500,
+ })
+ hoverStyles.push({
+ backgroundColor: t.palette.negative_600,
+ })
+ } else {
+ baseStyles.push({
+ backgroundColor: select(t.name, {
+ light: t.palette.negative_700,
+ dim: t.palette.negative_300,
+ dark: t.palette.negative_300,
+ }),
+ })
+ }
+ } else if (variant === 'outline') {
+ baseStyles.push(a.border, t.atoms.bg, {
+ borderWidth: 1,
+ })
+
+ if (!disabled) {
+ baseStyles.push(a.border, {
+ borderColor: t.palette.negative_500,
+ })
+ hoverStyles.push(a.border, {
+ backgroundColor: t.palette.negative_50,
+ })
+ } else {
+ baseStyles.push(a.border, {
+ borderColor: t.palette.negative_200,
+ })
+ }
+ } else if (variant === 'ghost') {
+ if (!disabled) {
+ baseStyles.push(t.atoms.bg)
+ hoverStyles.push({
+ backgroundColor: t.palette.negative_100,
+ })
+ }
+ }
+ }
+
+ if (shape === 'default') {
+ if (size === 'large') {
+ baseStyles.push({
+ paddingVertical: 13,
+ paddingHorizontal: 20,
+ borderRadius: 8,
+ gap: 8,
+ })
+ } else if (size === 'small') {
+ baseStyles.push({
+ paddingVertical: 8,
+ paddingHorizontal: 12,
+ borderRadius: 6,
+ gap: 6,
+ })
+ } else if (size === 'tiny') {
+ baseStyles.push({
+ paddingVertical: 4,
+ paddingHorizontal: 8,
+ borderRadius: 4,
+ gap: 4,
+ })
+ }
+ } else if (shape === 'round' || shape === 'square') {
+ if (size === 'large') {
+ if (shape === 'round') {
+ baseStyles.push({height: 46, width: 46})
+ } else {
+ baseStyles.push({height: 44, width: 44})
+ }
+ } else if (size === 'small') {
+ if (shape === 'round') {
+ baseStyles.push({height: 36, width: 36})
+ } else {
+ baseStyles.push({height: 34, width: 34})
+ }
+ } else if (size === 'tiny') {
+ if (shape === 'round') {
+ baseStyles.push({height: 22, width: 22})
+ } else {
+ baseStyles.push({height: 21, width: 21})
+ }
+ }
+
+ if (shape === 'round') {
+ baseStyles.push(a.rounded_full)
+ } else if (shape === 'square') {
+ if (size === 'tiny') {
+ baseStyles.push(a.rounded_xs)
+ } else {
+ baseStyles.push(a.rounded_sm)
+ }
+ }
+ }
+
+ return {
+ baseStyles,
+ hoverStyles,
+ }
+ }, [t, variant, color, size, shape, disabled])
const {gradientColors, gradientHoverColors, gradientLocations} =
React.useMemo(() => {
@@ -296,239 +521,6 @@ export const Button = React.forwardRef(
)
Button.displayName = 'Button'
-export function useSharedButtonStyles({
- color,
- variant,
- disabled,
- shape,
- size,
-}: VariantProps & {disabled?: boolean | null}) {
- const t = useTheme()
-
- const {baseStyles, hoverStyles} = React.useMemo(() => {
- const baseStyles: ViewStyle[] = []
- const hoverStyles: ViewStyle[] = []
-
- if (color === 'primary') {
- if (variant === 'solid') {
- if (!disabled) {
- baseStyles.push({
- backgroundColor: t.palette.primary_500,
- })
- hoverStyles.push({
- backgroundColor: t.palette.primary_600,
- })
- } else {
- baseStyles.push({
- backgroundColor: select(t.name, {
- light: t.palette.primary_700,
- dim: t.palette.primary_300,
- dark: t.palette.primary_300,
- }),
- })
- }
- } else if (variant === 'outline') {
- baseStyles.push(a.border, t.atoms.bg, {
- borderWidth: 1,
- })
-
- if (!disabled) {
- baseStyles.push(a.border, {
- borderColor: t.palette.primary_500,
- })
- hoverStyles.push(a.border, {
- backgroundColor: t.palette.primary_50,
- })
- } else {
- baseStyles.push(a.border, {
- borderColor: t.palette.primary_200,
- })
- }
- } else if (variant === 'ghost') {
- if (!disabled) {
- baseStyles.push(t.atoms.bg)
- hoverStyles.push({
- backgroundColor: t.palette.primary_100,
- })
- }
- }
- } else if (color === 'secondary') {
- if (variant === 'solid') {
- if (!disabled) {
- baseStyles.push(t.atoms.bg_contrast_25)
- hoverStyles.push(t.atoms.bg_contrast_50)
- } else {
- baseStyles.push(t.atoms.bg_contrast_100)
- }
- } else if (variant === 'outline') {
- baseStyles.push(a.border, t.atoms.bg, {
- borderWidth: 1,
- })
-
- if (!disabled) {
- baseStyles.push(a.border, {
- borderColor: t.palette.contrast_300,
- })
- hoverStyles.push(t.atoms.bg_contrast_50)
- } else {
- baseStyles.push(a.border, {
- borderColor: t.palette.contrast_200,
- })
- }
- } else if (variant === 'ghost') {
- if (!disabled) {
- baseStyles.push(t.atoms.bg)
- hoverStyles.push({
- backgroundColor: t.palette.contrast_25,
- })
- }
- }
- } else if (color === 'secondary_inverted') {
- if (variant === 'solid') {
- if (!disabled) {
- baseStyles.push({
- backgroundColor: t.palette.contrast_900,
- })
- hoverStyles.push({
- backgroundColor: t.palette.contrast_950,
- })
- } else {
- baseStyles.push({
- backgroundColor: t.palette.contrast_600,
- })
- }
- } else if (variant === 'outline') {
- baseStyles.push(a.border, t.atoms.bg, {
- borderWidth: 1,
- })
-
- if (!disabled) {
- baseStyles.push(a.border, {
- borderColor: t.palette.contrast_300,
- })
- hoverStyles.push(t.atoms.bg_contrast_50)
- } else {
- baseStyles.push(a.border, {
- borderColor: t.palette.contrast_200,
- })
- }
- } else if (variant === 'ghost') {
- if (!disabled) {
- baseStyles.push(t.atoms.bg)
- hoverStyles.push({
- backgroundColor: t.palette.contrast_25,
- })
- }
- }
- } else if (color === 'negative') {
- if (variant === 'solid') {
- if (!disabled) {
- baseStyles.push({
- backgroundColor: t.palette.negative_500,
- })
- hoverStyles.push({
- backgroundColor: t.palette.negative_600,
- })
- } else {
- baseStyles.push({
- backgroundColor: select(t.name, {
- light: t.palette.negative_700,
- dim: t.palette.negative_300,
- dark: t.palette.negative_300,
- }),
- })
- }
- } else if (variant === 'outline') {
- baseStyles.push(a.border, t.atoms.bg, {
- borderWidth: 1,
- })
-
- if (!disabled) {
- baseStyles.push(a.border, {
- borderColor: t.palette.negative_500,
- })
- hoverStyles.push(a.border, {
- backgroundColor: t.palette.negative_50,
- })
- } else {
- baseStyles.push(a.border, {
- borderColor: t.palette.negative_200,
- })
- }
- } else if (variant === 'ghost') {
- if (!disabled) {
- baseStyles.push(t.atoms.bg)
- hoverStyles.push({
- backgroundColor: t.palette.negative_100,
- })
- }
- }
- }
-
- if (shape === 'default') {
- if (size === 'large') {
- baseStyles.push({
- paddingVertical: 13,
- paddingHorizontal: 20,
- borderRadius: 8,
- gap: 8,
- })
- } else if (size === 'small') {
- baseStyles.push({
- paddingVertical: 8,
- paddingHorizontal: 12,
- borderRadius: 6,
- gap: 6,
- })
- } else if (size === 'tiny') {
- baseStyles.push({
- paddingVertical: 4,
- paddingHorizontal: 8,
- borderRadius: 4,
- gap: 4,
- })
- }
- } else if (shape === 'round' || shape === 'square') {
- if (size === 'large') {
- if (shape === 'round') {
- baseStyles.push({height: 46, width: 46})
- } else {
- baseStyles.push({height: 44, width: 44})
- }
- } else if (size === 'small') {
- if (shape === 'round') {
- baseStyles.push({height: 36, width: 36})
- } else {
- baseStyles.push({height: 34, width: 34})
- }
- } else if (size === 'tiny') {
- if (shape === 'round') {
- baseStyles.push({height: 22, width: 22})
- } else {
- baseStyles.push({height: 21, width: 21})
- }
- }
-
- if (shape === 'round') {
- baseStyles.push(a.rounded_full)
- } else if (shape === 'square') {
- if (size === 'tiny') {
- baseStyles.push(a.rounded_xs)
- } else {
- baseStyles.push(a.rounded_sm)
- }
- }
- }
-
- return {
- baseStyles,
- hoverStyles,
- }
- }, [t, variant, color, size, shape, disabled])
-
- return {baseStyles, hoverStyles}
-}
-
export function useSharedButtonTextStyles() {
const t = useTheme()
const {color, variant, disabled, size} = useButtonContext()
diff --git a/src/components/Dialog/context.ts b/src/components/Dialog/context.ts
index 859f8edd77..27b8a56375 100644
--- a/src/components/Dialog/context.ts
+++ b/src/components/Dialog/context.ts
@@ -9,6 +9,7 @@ import {
export const Context = React.createContext({
close: () => {},
+ insideDialog: false,
})
export function useDialogContext() {
diff --git a/src/components/Dialog/index.tsx b/src/components/Dialog/index.tsx
index 73b592ff27..7493e7748b 100644
--- a/src/components/Dialog/index.tsx
+++ b/src/components/Dialog/index.tsx
@@ -56,7 +56,6 @@ export function OuterWithoutPortal({
const insets = useSafeAreaInsets()
const closeCallbacks = React.useRef<(() => void)[]>([])
const {setDialogIsOpen} = useDialogStateControlContext()
- // @TODO DIALOG REFACTOR - can i get rid of this? seems pointless tbh
const callQueuedCallbacks = React.useCallback(() => {
for (const cb of closeCallbacks.current) {
@@ -104,21 +103,13 @@ export function OuterWithoutPortal({
[open, close],
)
- // @TODO DIALOG REFACTOR - what is this? rm i think?
- // React.useEffect(() => {
- // return () => {
- // setDialogIsOpen(control.id, false)
- // }
- // }, [control.id, setDialogIsOpen])
-
- const context = React.useMemo(() => ({close}), [close])
+ const context = React.useMemo(() => ({close, insideDialog: true}), [close])
const Wrapper = isIOS ? View : GestureHandlerRootView
return (
({
close,
+ insideDialog: true,
}),
[close],
)
@@ -229,10 +230,6 @@ export const InnerFlatList = React.forwardRef<
)
})
-export function Handle() {
- return null
-}
-
export function Close() {
const {_} = useLingui()
const {close} = React.useContext(Context)
diff --git a/src/components/Dialog/types.ts b/src/components/Dialog/types.ts
index ed83bd02b1..a8568e5748 100644
--- a/src/components/Dialog/types.ts
+++ b/src/components/Dialog/types.ts
@@ -37,6 +37,7 @@ export type DialogControlProps = DialogControlRefProps & {
export type DialogContextProps = {
close: DialogControlProps['close']
+ insideDialog: boolean
}
export type DialogControlOpenOptions = {
diff --git a/src/components/FeedCard.tsx b/src/components/FeedCard.tsx
index 03a57d0389..b28f66f839 100644
--- a/src/components/FeedCard.tsx
+++ b/src/components/FeedCard.tsx
@@ -1,6 +1,5 @@
import React from 'react'
import {GestureResponderEvent, View} from 'react-native'
-import {PressableEvent} from 'react-native-gesture-handler/lib/typescript/components/Pressable/PressableProps'
import {
AppBskyActorDefs,
AppBskyFeedDefs,
@@ -14,7 +13,6 @@ import {useQueryClient} from '@tanstack/react-query'
import {sanitizeHandle} from '#/lib/strings/handles'
import {logger} from '#/logger'
-import {isWeb} from '#/platform/detection'
import {precacheFeedFromGeneratorView} from '#/state/queries/feed'
import {
useAddSavedFeedsMutation,
@@ -256,13 +254,9 @@ function SaveButtonInner({
const isPending = isAddSavedFeedPending || isRemovePending
const toggleSave = React.useCallback(
- async (e: GestureResponderEvent | PressableEvent) => {
- // WEB ONLY - this is okay. See `BottomSheetPressable.web.tsx`
- if (isWeb) {
- e = e as GestureResponderEvent
- e.preventDefault()
- e.stopPropagation()
- }
+ async (e: GestureResponderEvent) => {
+ e.preventDefault()
+ e.stopPropagation()
try {
if (savedFeedConfig) {
diff --git a/src/components/Link.tsx b/src/components/Link.tsx
index 56d030b5df..5a66767243 100644
--- a/src/components/Link.tsx
+++ b/src/components/Link.tsx
@@ -23,7 +23,6 @@ import {shouldClickOpenNewTab} from '#/platform/urls'
import {useModalControls} from '#/state/modals'
import {useOpenLink} from '#/state/preferences/in-app-browser'
import {atoms as a, flatten, TextStyleProp, useTheme, web} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
import {Button, ButtonProps} from '#/components/Button'
import {useInteractionState} from '#/components/hooks/useInteractionState'
import {Text, TextProps} from '#/components/Typography'
@@ -258,7 +257,7 @@ export function BottomSheetLink({
})
return (
-
{children}
-
+
)
}
diff --git a/src/components/NewskieDialog.tsx b/src/components/NewskieDialog.tsx
index 0ed29babb1..e25f48edf5 100644
--- a/src/components/NewskieDialog.tsx
+++ b/src/components/NewskieDialog.tsx
@@ -12,7 +12,6 @@ import {isNative} from '#/platform/detection'
import {useModerationOpts} from '#/state/preferences/moderation-opts'
import {useSession} from '#/state/session'
import {atoms as a, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
import {Button, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {useDialogControl} from '#/components/Dialog'
@@ -142,7 +141,7 @@ export function NewskieDialog({
) : null}
{isNative && (
-
Close
-
+
)}
diff --git a/src/components/NormalizedRNGHPressable.web.tsx b/src/components/NormalizedRNGHPressable.web.tsx
index fa786a6070..86f5730495 100644
--- a/src/components/NormalizedRNGHPressable.web.tsx
+++ b/src/components/NormalizedRNGHPressable.web.tsx
@@ -1,3 +1,3 @@
-import {Pressable as NormalizedPressable} from 'react-native'
+import {Pressable as NormalizedRNGHPressable} from 'react-native'
-export {NormalizedPressable}
+export {NormalizedRNGHPressable}
diff --git a/src/components/Prompt.tsx b/src/components/Prompt.tsx
index 7bd284f2ae..3e877a6630 100644
--- a/src/components/Prompt.tsx
+++ b/src/components/Prompt.tsx
@@ -1,13 +1,11 @@
import React from 'react'
-import {View} from 'react-native'
-import {PressableEvent} from 'react-native-gesture-handler/lib/typescript/components/Pressable/PressableProps'
+import {GestureResponderEvent, View} from 'react-native'
import {msg} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import {isNative} from '#/platform/detection'
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonColor, ButtonText} from '#/components/Button'
+import {Button, ButtonColor, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {Text} from '#/components/Typography'
@@ -123,14 +121,14 @@ export function Cancel({
}, [close])
return (
-
{cta || _(msg`Cancel`)}
-
+
)
}
@@ -147,7 +145,7 @@ export function Action({
* Note: The dialog will close automatically when the action is pressed, you
* should NOT close the dialog as a side effect of this method.
*/
- onPress: (e: PressableEvent) => void
+ onPress: (e: GestureResponderEvent) => void
color?: ButtonColor
/**
* Optional i18n string. If undefined, it will default to "Confirm".
@@ -159,14 +157,14 @@ export function Action({
const {gtMobile} = useBreakpoints()
const {close} = Dialog.useDialogContext()
const handleOnPress = React.useCallback(
- (e: PressableEvent) => {
+ (e: GestureResponderEvent) => {
close(() => onPress?.(e))
},
[close, onPress],
)
return (
-
{cta || _(msg`Confirm`)}
-
+
)
}
@@ -201,7 +199,7 @@ export function Basic({
* Note: The dialog will close automatically when the action is pressed, you
* should NOT close the dialog as a side effect of this method.
*/
- onConfirm: (e: PressableEvent) => void
+ onConfirm: (e: GestureResponderEvent) => void
confirmButtonColor?: ButtonColor
showCancel?: boolean
withoutPortal?: boolean
diff --git a/src/components/ReportDialog/SelectLabelerView.tsx b/src/components/ReportDialog/SelectLabelerView.tsx
index e62dc9910b..039bbf123f 100644
--- a/src/components/ReportDialog/SelectLabelerView.tsx
+++ b/src/components/ReportDialog/SelectLabelerView.tsx
@@ -6,8 +6,7 @@ import {useLingui} from '@lingui/react'
import {getLabelingServiceTitle} from '#/lib/moderation'
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {useButtonContext} from '#/components/Button'
+import {Button, useButtonContext} from '#/components/Button'
import {Divider} from '#/components/Divider'
import * as LabelingServiceCard from '#/components/LabelingServiceCard'
import {Text} from '#/components/Typography'
@@ -39,12 +38,12 @@ export function SelectLabelerView({
{props.labelers.map(labeler => {
return (
- props.onSelectLabeler(labeler.creator.did)}>
-
+
)
})}
diff --git a/src/components/ReportDialog/SelectReportOptionView.tsx b/src/components/ReportDialog/SelectReportOptionView.tsx
index 9d97441915..7e27cacf0c 100644
--- a/src/components/ReportDialog/SelectReportOptionView.tsx
+++ b/src/components/ReportDialog/SelectReportOptionView.tsx
@@ -10,8 +10,12 @@ import {DMCA_LINK} from '#/components/ReportDialog/const'
export {useDialogControl as useReportDialogControl} from '#/components/Dialog'
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonIcon, ButtonText, useButtonContext} from '#/components/Button'
+import {
+ Button,
+ ButtonIcon,
+ ButtonText,
+ useButtonContext,
+} from '#/components/Button'
import {Divider} from '#/components/Divider'
import {
ChevronLeft_Stroke2_Corner0_Rounded as ChevronLeft,
@@ -68,7 +72,7 @@ export function SelectReportOptionView({
return (
{props.labelers?.length > 1 ? (
-
-
+
) : null}
@@ -91,7 +95,7 @@ export function SelectReportOptionView({
{reportOptions.map(reportOption => {
return (
-
-
+
)
})}
diff --git a/src/components/ReportDialog/SubmitView.tsx b/src/components/ReportDialog/SubmitView.tsx
index dae66e4e31..682e918c2d 100644
--- a/src/components/ReportDialog/SubmitView.tsx
+++ b/src/components/ReportDialog/SubmitView.tsx
@@ -10,8 +10,7 @@ import {useAgent} from '#/state/session'
import {CharProgress} from '#/view/com/composer/char-progress/CharProgress'
import * as Toast from '#/view/com/util/Toast'
import {atoms as a, native, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonIcon, ButtonText} from '#/components/Button'
+import {Button, ButtonIcon, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import * as Toggle from '#/components/forms/Toggle'
import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check'
@@ -102,7 +101,7 @@ export function SubmitView({
return (
-
-
+
))}
- Send report
{submitting && }
-
+
)
diff --git a/src/components/ReportDialog/index.tsx b/src/components/ReportDialog/index.tsx
index b942659380..b781d9f39e 100644
--- a/src/components/ReportDialog/index.tsx
+++ b/src/components/ReportDialog/index.tsx
@@ -1,5 +1,6 @@
import React from 'react'
-import {Pressable, ScrollView, View} from 'react-native'
+import {Pressable, View} from 'react-native'
+import {ScrollView} from 'react-native-gesture-handler'
import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react'
diff --git a/src/components/StarterPack/QrCodeDialog.tsx b/src/components/StarterPack/QrCodeDialog.tsx
index b7dbd66cd0..2feea0973a 100644
--- a/src/components/StarterPack/QrCodeDialog.tsx
+++ b/src/components/StarterPack/QrCodeDialog.tsx
@@ -13,8 +13,7 @@ import {logger} from '#/logger'
import {isNative, isWeb} from '#/platform/detection'
import * as Toast from '#/view/com/util/Toast'
import {atoms as a} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonText} from '#/components/Button'
+import {Button, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {DialogControlProps} from '#/components/Dialog'
import {Loader} from '#/components/Loader'
@@ -166,7 +165,7 @@ export function QrCodeDialog({
) : (
-
{isWeb ? Copy : Share}
-
-
+
+
)}
>
diff --git a/src/components/StarterPack/ShareDialog.tsx b/src/components/StarterPack/ShareDialog.tsx
index ec12907cb0..494aceae1f 100644
--- a/src/components/StarterPack/ShareDialog.tsx
+++ b/src/components/StarterPack/ShareDialog.tsx
@@ -15,8 +15,7 @@ import {logger} from '#/logger'
import {isNative, isWeb} from '#/platform/detection'
import * as Toast from '#/view/com/util/Toast'
import {atoms as a, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonText} from '#/components/Button'
+import {Button, ButtonText} from '#/components/Button'
import {DialogControlProps} from '#/components/Dialog'
import * as Dialog from '#/components/Dialog'
import {Loader} from '#/components/Loader'
@@ -120,7 +119,7 @@ function ShareDialogInner({
a.gap_md,
isWeb && [a.gap_sm, a.flex_row_reverse, {marginLeft: 'auto'}],
]}>
-
{isWeb ? Copy Link : Share link}
-
-
+
+
{isNative && (
-
Save image
-
+
)}
diff --git a/src/components/StarterPack/Wizard/WizardEditListDialog.tsx b/src/components/StarterPack/Wizard/WizardEditListDialog.tsx
index 3400bed4b6..d1ecdc8821 100644
--- a/src/components/StarterPack/Wizard/WizardEditListDialog.tsx
+++ b/src/components/StarterPack/Wizard/WizardEditListDialog.tsx
@@ -12,8 +12,7 @@ import {useSession} from '#/state/session'
import {ListMethods} from '#/view/com/util/List'
import {WizardAction, WizardState} from '#/screens/StarterPack/Wizard/State'
import {atoms as a, native, useTheme, web} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonText} from '#/components/Button'
+import {Button, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {
WizardFeedCard,
@@ -112,7 +111,7 @@ export function WizardEditListDialog({
{isWeb && (
-
Close
-
+
)}
diff --git a/src/components/StarterPack/Wizard/WizardListCard.tsx b/src/components/StarterPack/Wizard/WizardListCard.tsx
index 879d95f1cd..44f01a1545 100644
--- a/src/components/StarterPack/Wizard/WizardListCard.tsx
+++ b/src/components/StarterPack/Wizard/WizardListCard.tsx
@@ -19,8 +19,7 @@ import {useSession} from '#/state/session'
import {UserAvatar} from '#/view/com/util/UserAvatar'
import {WizardAction, WizardState} from '#/screens/StarterPack/Wizard/State'
import {atoms as a, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonText} from '#/components/Button'
+import {Button, ButtonText} from '#/components/Button'
import * as Toggle from '#/components/forms/Toggle'
import {Checkbox} from '#/components/forms/Toggle'
import {Text} from '#/components/Typography'
@@ -99,7 +98,7 @@ function WizardListCard({
{btnType === 'checkbox' ? (
) : !disabled ? (
-
Remove
-
+
) : null}
)
diff --git a/src/components/TagMenu/index.tsx b/src/components/TagMenu/index.tsx
index 8b6a62e440..2e4249609a 100644
--- a/src/components/TagMenu/index.tsx
+++ b/src/components/TagMenu/index.tsx
@@ -13,8 +13,7 @@ import {
useUpsertMutedWordsMutation,
} from '#/state/queries/preferences'
import {atoms as a, native, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonText} from '#/components/Button'
+import {Button, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {Divider} from '#/components/Divider'
import {MagnifyingGlass2_Stroke2_Corner0_Rounded as Search} from '#/components/icons/MagnifyingGlass2'
@@ -212,7 +211,7 @@ export function TagMenu({
<>
- posts
-
+
>
) : null}
-
Cancel
-
+
>
)}
diff --git a/src/components/WhoCanReply.tsx b/src/components/WhoCanReply.tsx
index ba9970af42..2839943c97 100644
--- a/src/components/WhoCanReply.tsx
+++ b/src/components/WhoCanReply.tsx
@@ -17,7 +17,7 @@ import {
threadgateViewToAllowUISetting,
} from '#/state/queries/threadgate'
import {atoms as a, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
+import {Button} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {useDialogControl} from '#/components/Dialog'
import {
@@ -82,7 +82,7 @@ export function WhoCanReply({post, isThreadAuthor, style}: WhoCanReplyProps) {
return (
<>
-
- {/* @TODO DIALOG REFACTOR hovered */}
- {({pressed}) => (
+ {({hovered}) => (
{description}
@@ -121,7 +120,7 @@ export function WhoCanReply({post, isThreadAuthor, style}: WhoCanReplyProps) {
)}
)}
-
+
{isThreadAuthor ? (
- Save : Done}
{isPending && }
-
+
)
diff --git a/src/components/dialogs/Embed.tsx b/src/components/dialogs/Embed.tsx
index 525010230e..7aa2a4fc1e 100644
--- a/src/components/dialogs/Embed.tsx
+++ b/src/components/dialogs/Embed.tsx
@@ -8,13 +8,12 @@ import {EMBED_SCRIPT} from '#/lib/constants'
import {niceDate} from '#/lib/strings/time'
import {toShareUrl} from '#/lib/strings/url-helpers'
import {atoms as a, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
import * as Dialog from '#/components/Dialog'
import * as TextField from '#/components/forms/TextField'
import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check'
import {CodeBrackets_Stroke2_Corner0_Rounded as CodeBrackets} from '#/components/icons/CodeBrackets'
import {Text} from '#/components/Typography'
-import {ButtonIcon, ButtonText} from '../Button'
+import {Button, ButtonIcon, ButtonText} from '../Button'
type EmbedDialogProps = {
control: Dialog.DialogControlProps
@@ -118,7 +117,7 @@ function EmbedDialogInner({
/>
- Copy code
)}
-
+
diff --git a/src/components/dialogs/EmbedConsent.tsx b/src/components/dialogs/EmbedConsent.tsx
index c6d8f8f86a..3aa0f0b404 100644
--- a/src/components/dialogs/EmbedConsent.tsx
+++ b/src/components/dialogs/EmbedConsent.tsx
@@ -10,9 +10,8 @@ import {
} from '#/lib/strings/embed-player'
import {useSetExternalEmbedPref} from '#/state/preferences'
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
import * as Dialog from '#/components/Dialog'
-import {ButtonText} from '../Button'
+import {Button, ButtonText} from '../Button'
import {Text} from '../Typography'
export function EmbedConsentDialog({
@@ -76,30 +75,33 @@ export function EmbedConsentDialog({
-
Enable external media
-
-
+
-
+
+
diff --git a/src/components/dialogs/GifSelect.tsx b/src/components/dialogs/GifSelect.tsx
index e270b2e1d6..887cc30378 100644
--- a/src/components/dialogs/GifSelect.tsx
+++ b/src/components/dialogs/GifSelect.tsx
@@ -20,13 +20,12 @@ import {ErrorScreen} from '#/view/com/util/error/ErrorScreen'
import {ErrorBoundary} from '#/view/com/util/ErrorBoundary'
import {ListMethods} from '#/view/com/util/List'
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
import * as Dialog from '#/components/Dialog'
import * as TextField from '#/components/forms/TextField'
import {useThrottledValue} from '#/components/hooks/useThrottledValue'
import {ArrowLeft_Stroke2_Corner0_Rounded as Arrow} from '#/components/icons/Arrow'
import {MagnifyingGlass2_Stroke2_Corner0_Rounded as Search} from '#/components/icons/MagnifyingGlass2'
-import {ButtonIcon, ButtonText} from '../Button'
+import {Button, ButtonIcon, ButtonText} from '../Button'
import {ListFooter, ListMaybePlaceholder} from '../Lists'
import {GifPreview} from './GifSelect.shared'
@@ -149,7 +148,7 @@ function GifList({
/>
{!gtMobile && isWeb && (
- control.close()}
label={_(msg`Close GIF dialog`)}>
-
+
)}
@@ -257,7 +256,7 @@ function DialogError({details}: {details?: string}) {
)}
details={details}
/>
- control.close()}
color="primary"
@@ -266,7 +265,7 @@ function DialogError({details}: {details?: string}) {
Close
-
+
)
}
diff --git a/src/components/dialogs/MutedWords.tsx b/src/components/dialogs/MutedWords.tsx
index d12bf63ca9..55fd98d711 100644
--- a/src/components/dialogs/MutedWords.tsx
+++ b/src/components/dialogs/MutedWords.tsx
@@ -19,8 +19,7 @@ import {
ViewStyleProp,
web,
} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonIcon, ButtonText} from '#/components/Button'
+import {Button, ButtonIcon, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {useGlobalDialogsControlContext} from '#/components/dialogs/Context'
import {Divider} from '#/components/Divider'
@@ -324,7 +323,7 @@ function MutedWordsInner() {
- Add
-
+
{error && (
@@ -527,7 +526,7 @@ function MutedWordRow({
)}
- control.open()}
style={[a.ml_sm]}>
-
+
>
)
diff --git a/src/components/dialogs/PostInteractionSettingsDialog.tsx b/src/components/dialogs/PostInteractionSettingsDialog.tsx
index 94f458bde1..cc8b4fc9bf 100644
--- a/src/components/dialogs/PostInteractionSettingsDialog.tsx
+++ b/src/components/dialogs/PostInteractionSettingsDialog.tsx
@@ -30,8 +30,7 @@ import {
import {useAgent, useSession} from '#/state/session'
import * as Toast from '#/view/com/util/Toast'
import {atoms as a, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonIcon, ButtonText} from '#/components/Button'
+import {Button, ButtonIcon, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {Divider} from '#/components/Divider'
import * as Toggle from '#/components/forms/Toggle'
@@ -231,6 +230,7 @@ export function PostInteractionSettingsForm({
}: PostInteractionSettingsFormProps) {
const t = useTheme()
const {_} = useLingui()
+ const control = Dialog.useDialogContext()
const {data: lists} = useMyListsQuery('curate')
const [quotesEnabled, setQuotesEnabled] = React.useState(
!(
@@ -434,16 +434,17 @@ export function PostInteractionSettingsForm({
-
{_(msg`Save`)}
{isSaving && }
-
+
)
}
@@ -463,7 +464,7 @@ function Selectable({
}) {
const t = useTheme()
return (
-
- {/* @TODO DIALOG REFACTOR hovered focused */}
- {({pressed}) => (
+ {({hovered, focused}) => (
)}
-
+
)
}
diff --git a/src/components/dialogs/Signin.tsx b/src/components/dialogs/Signin.tsx
index f348f08621..d24f6af644 100644
--- a/src/components/dialogs/Signin.tsx
+++ b/src/components/dialogs/Signin.tsx
@@ -9,8 +9,7 @@ import {useCloseAllActiveElements} from '#/state/util'
import {Logo} from '#/view/icons/Logo'
import {Logotype} from '#/view/icons/Logotype'
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonText} from '#/components/Button'
+import {Button, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {useGlobalDialogsControlContext} from '#/components/dialogs/Context'
import {Text} from '#/components/Typography'
@@ -78,7 +77,7 @@ function SigninDialogInner({}: {control: Dialog.DialogOuterProps['control']}) {
-
Create an account
-
+
-
Sign in
-
+
{isNative && }
diff --git a/src/components/dms/MessagesNUX.tsx b/src/components/dms/MessagesNUX.tsx
index 8ebd244e40..723696a04d 100644
--- a/src/components/dms/MessagesNUX.tsx
+++ b/src/components/dms/MessagesNUX.tsx
@@ -9,8 +9,7 @@ import {useProfileQuery} from '#/state/queries/profile'
import {useSession} from '#/state/session'
import * as Toast from '#/view/com/util/Toast'
import {atoms as a, useTheme, web} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonText} from '#/components/Button'
+import {Button, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import * as Toggle from '#/components/forms/Toggle'
import {Message_Stroke2_Corner0_Rounded} from '#/components/icons/Message'
@@ -157,7 +156,7 @@ function DialogInner({
-
Get started
-
+
diff --git a/src/components/dms/dialogs/SearchablePeopleList.tsx b/src/components/dms/dialogs/SearchablePeopleList.tsx
index 5a4f64f88f..17a7f43e57 100644
--- a/src/components/dms/dialogs/SearchablePeopleList.tsx
+++ b/src/components/dms/dialogs/SearchablePeopleList.tsx
@@ -21,7 +21,7 @@ import {useSession} from '#/state/session'
import {ListMethods} from '#/view/com/util/List'
import {UserAvatar} from '#/view/com/util/UserAvatar'
import {atoms as a, native, useTheme, web} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
+import {Button} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {canBeMessaged} from '#/components/dms/util'
import {useInteractionState} from '#/components/hooks/useInteractionState'
@@ -254,7 +254,7 @@ export function SearchablePeopleList({
a.justify_center,
{height: 32},
]}>
-
)}
-
+
- {({pressed}) => (
+ {({hovered, pressed, focused}) => (
)}
-
+
)
}
diff --git a/src/components/forms/DateField/index.tsx b/src/components/forms/DateField/index.tsx
index 7e3d2a18f2..7546aec484 100644
--- a/src/components/forms/DateField/index.tsx
+++ b/src/components/forms/DateField/index.tsx
@@ -5,8 +5,7 @@ import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import {atoms as a, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonText} from '#/components/Button'
+import {Button, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {DateFieldProps} from '#/components/forms/DateField/types'
import {toSimpleDateString} from '#/components/forms/DateField/utils'
@@ -73,7 +72,7 @@ export function DateField({
accessibilityHint={accessibilityHint}
/>
- control.close()}
size="large"
@@ -82,7 +81,7 @@ export function DateField({
Done
-
+
diff --git a/src/components/intents/VerifyEmailIntentDialog.tsx b/src/components/intents/VerifyEmailIntentDialog.tsx
index c52061279c..070ba7c40e 100644
--- a/src/components/intents/VerifyEmailIntentDialog.tsx
+++ b/src/components/intents/VerifyEmailIntentDialog.tsx
@@ -6,8 +6,7 @@ import {useLingui} from '@lingui/react'
import {isNative} from '#/platform/detection'
import {useAgent, useSession} from '#/state/session'
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonIcon, ButtonText} from '#/components/Button'
+import {Button, ButtonIcon, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {DialogControlProps} from '#/components/Dialog'
import {Divider} from '#/components/Divider'
@@ -118,7 +117,7 @@ function Inner({}: {control: DialogControlProps}) {
{status === 'failure' && (
<>
-
Resend Email
-
+
>
)}
diff --git a/src/components/moderation/LabelsOnMeDialog.tsx b/src/components/moderation/LabelsOnMeDialog.tsx
index 22eb406a00..fc30b004ad 100644
--- a/src/components/moderation/LabelsOnMeDialog.tsx
+++ b/src/components/moderation/LabelsOnMeDialog.tsx
@@ -13,9 +13,8 @@ import {logger} from '#/logger'
import {useAgent, useSession} from '#/state/session'
import * as Toast from '#/view/com/util/Toast'
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
import {BottomSheetInlineLinkText} from '#/components/BottomSheetLink'
-import {ButtonIcon, ButtonText} from '#/components/Button'
+import {Button, ButtonIcon, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {InlineLinkText} from '#/components/Link'
import {Text} from '#/components/Typography'
@@ -141,7 +140,7 @@ function Label({
{!isSelfLabel && (
-
Appeal
-
+
)}
@@ -279,7 +278,7 @@ function AppealForm({
? [a.flex_row, a.justify_between]
: [{flexDirection: 'column-reverse'}, a.gap_sm]
}>
-
{_(msg`Back`)}
-
-
+
+
>
)
diff --git a/src/screens/Onboarding/StepProfile/index.tsx b/src/screens/Onboarding/StepProfile/index.tsx
index 0672d4fd37..c6a39ab45e 100644
--- a/src/screens/Onboarding/StepProfile/index.tsx
+++ b/src/screens/Onboarding/StepProfile/index.tsx
@@ -30,7 +30,6 @@ import {
PlaceholderCanvasRef,
} from '#/screens/Onboarding/StepProfile/PlaceholderCanvas'
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {IconCircle} from '#/components/IconCircle'
@@ -312,7 +311,7 @@ export function StepProfile() {
/>
-
Done
-
+
diff --git a/src/view/com/auth/server-input/index.tsx b/src/view/com/auth/server-input/index.tsx
index c39106f702..659ff7f733 100644
--- a/src/view/com/auth/server-input/index.tsx
+++ b/src/view/com/auth/server-input/index.tsx
@@ -6,8 +6,7 @@ import {useLingui} from '@lingui/react'
import {BSKY_SERVICE} from '#/lib/constants'
import * as persisted from '#/state/persisted'
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonText} from '#/components/Button'
+import {Button, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import * as TextField from '#/components/forms/TextField'
import * as ToggleButton from '#/components/forms/ToggleButton'
@@ -130,7 +129,7 @@ export function ServerInputDialog({
{pdsAddressHistory.length > 0 && (
{pdsAddressHistory.map(uri => (
- setCustomAddress(uri)}>
{uri}
-
+
))}
)}
@@ -166,7 +165,7 @@ export function ServerInputDialog({
- control.close()}
label={_(msg`Done`)}>
{_(msg`Done`)}
-
+
diff --git a/src/view/com/composer/GifAltText.tsx b/src/view/com/composer/GifAltText.tsx
index a1b869c134..1737fc29ca 100644
--- a/src/view/com/composer/GifAltText.tsx
+++ b/src/view/com/composer/GifAltText.tsx
@@ -14,8 +14,7 @@ import {
import {enforceLen} from '#/lib/strings/helpers'
import {Gif} from '#/state/queries/tenor'
import {atoms as a, native, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonText} from '#/components/Button'
+import {Button, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import * as TextField from '#/components/forms/TextField'
import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check'
@@ -155,7 +154,7 @@ function AltTextInner({
/>
-
Save
-
+
{/* below the text input to force tab order */}
diff --git a/src/view/com/composer/photos/EditImageDialog.web.tsx b/src/view/com/composer/photos/EditImageDialog.web.tsx
index daffcc6080..0afb83ed96 100644
--- a/src/view/com/composer/photos/EditImageDialog.web.tsx
+++ b/src/view/com/composer/photos/EditImageDialog.web.tsx
@@ -12,8 +12,7 @@ import {
manipulateImage,
} from '#/state/gallery'
import {atoms as a} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonText} from '#/components/Button'
+import {Button, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {Text} from '#/components/Typography'
import {EditImageDialogProps} from './EditImageDialog'
@@ -72,7 +71,7 @@ const EditImageInner = ({control, image, onChange}: EditImageDialogProps) => {
- {
Save
-
+
)
diff --git a/src/view/com/composer/photos/ImageAltTextDialog.tsx b/src/view/com/composer/photos/ImageAltTextDialog.tsx
index 9dcb877cd9..fc9c6c4931 100644
--- a/src/view/com/composer/photos/ImageAltTextDialog.tsx
+++ b/src/view/com/composer/photos/ImageAltTextDialog.tsx
@@ -8,8 +8,7 @@ import {MAX_ALT_TEXT} from '#/lib/constants'
import {isWeb} from '#/platform/detection'
import {ComposerImage} from '#/state/gallery'
import {atoms as a, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonText} from '#/components/Button'
+import {Button, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import * as TextField from '#/components/forms/TextField'
import {Text} from '#/components/Typography'
@@ -103,7 +102,7 @@ const ImageAltTextInner = ({
/>
- MAX_ALT_TEXT || altText === image.alt}
size="large"
@@ -113,7 +112,7 @@ const ImageAltTextInner = ({
Save
-
+
)
diff --git a/src/view/com/composer/videos/SubtitleDialog.tsx b/src/view/com/composer/videos/SubtitleDialog.tsx
index c3d94bc0fb..d57c6740cf 100644
--- a/src/view/com/composer/videos/SubtitleDialog.tsx
+++ b/src/view/com/composer/videos/SubtitleDialog.tsx
@@ -10,7 +10,6 @@ import {LANGUAGES} from '#/locale/languages'
import {isWeb} from '#/platform/detection'
import {useLanguagePrefs} from '#/state/preferences'
import {atoms as a, useTheme, web} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import * as TextField from '#/components/forms/TextField'
@@ -165,7 +164,7 @@ function SubtitleDialogInner({
)}
-
Done
-
+
@@ -258,7 +257,7 @@ function SubtitleFileRow({
-
-
+
)
}
diff --git a/src/view/com/util/post-ctrls/RepostButton.tsx b/src/view/com/util/post-ctrls/RepostButton.tsx
index aaa8d4152f..896e197b65 100644
--- a/src/view/com/util/post-ctrls/RepostButton.tsx
+++ b/src/view/com/util/post-ctrls/RepostButton.tsx
@@ -7,7 +7,6 @@ import {POST_CTRL_HITSLOP} from '#/lib/constants'
import {useHaptics} from '#/lib/haptics'
import {useRequireAuth} from '#/state/session'
import {atoms as a, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
import {Button, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {CloseQuote_Stroke2_Corner1_Rounded as Quote} from '#/components/icons/Quote'
@@ -93,7 +92,7 @@ let RepostButton = ({
-
-
-
+
+
-
{_(msg`Cancel`)}
-
+
diff --git a/src/view/screens/Settings/DisableEmail2FADialog.tsx b/src/view/screens/Settings/DisableEmail2FADialog.tsx
index 64a3061b11..bbc6902543 100644
--- a/src/view/screens/Settings/DisableEmail2FADialog.tsx
+++ b/src/view/screens/Settings/DisableEmail2FADialog.tsx
@@ -9,8 +9,7 @@ import {useAgent, useSession} from '#/state/session'
import {ErrorMessage} from '#/view/com/util/error/ErrorMessage'
import * as Toast from '#/view/com/util/Toast'
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonIcon, ButtonText} from '#/components/Button'
+import {Button, ButtonIcon, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import * as TextField from '#/components/forms/TextField'
import {Lock_Stroke2_Corner0_Rounded as Lock} from '#/components/icons/Lock'
@@ -109,7 +108,7 @@ export function DisableEmail2FADialog({
{stage === Stages.Email ? (
- Send verification email
{isProcessing && }
-
-
+
+
) : stage === Stages.ConfirmCode ? (
@@ -158,7 +157,7 @@ export function DisableEmail2FADialog({
-
Resend email
-
-
+
+
) : undefined}
diff --git a/src/view/screens/Settings/ExportCarDialog.tsx b/src/view/screens/Settings/ExportCarDialog.tsx
index caddc1c2ad..3d21d7cb5e 100644
--- a/src/view/screens/Settings/ExportCarDialog.tsx
+++ b/src/view/screens/Settings/ExportCarDialog.tsx
@@ -8,8 +8,7 @@ import {logger} from '#/logger'
import {useAgent} from '#/state/session'
import * as Toast from '#/view/com/util/Toast'
import {atoms as a, useTheme} from '#/alf'
-import {BottomSheetButton} from '#/components/BottomSheetButton'
-import {ButtonIcon, ButtonText} from '#/components/Button'
+import {Button, ButtonIcon, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {InlineLinkText} from '#/components/Link'
import {Loader} from '#/components/Loader'
@@ -69,7 +68,7 @@ export function ExportCarDialog({
- Download CAR file
{loading && }
-
+