replace all buttons with BottomSheetButton

This commit is contained in:
Hailey
2024-10-01 19:14:12 -07:00
parent baf1923ac6
commit a3737f0015
33 changed files with 533 additions and 373 deletions
+6 -5
View File
@@ -17,7 +17,7 @@ import {
threadgateViewToAllowUISetting,
} from '#/state/queries/threadgate'
import {atoms as a, useTheme} from '#/alf'
import {Button} from '#/components/Button'
import {BottomSheetButton} from '#/components/BottomSheetButton'
import * as Dialog from '#/components/Dialog'
import {useDialogControl} from '#/components/Dialog'
import {
@@ -82,7 +82,7 @@ export function WhoCanReply({post, isThreadAuthor, style}: WhoCanReplyProps) {
return (
<>
<Button
<BottomSheetButton
label={
isThreadAuthor ? _(msg`Edit who can reply`) : _(msg`Who can reply`)
}
@@ -98,7 +98,8 @@ export function WhoCanReply({post, isThreadAuthor, style}: WhoCanReplyProps) {
})
: {})}
hitSlop={HITSLOP_10}>
{({hovered}) => (
{/* @TODO DIALOG REFACTOR hovered */}
{({pressed}) => (
<View style={[a.flex_row, a.align_center, a.gap_xs, style]}>
<Icon
color={t.palette.contrast_400}
@@ -110,7 +111,7 @@ export function WhoCanReply({post, isThreadAuthor, style}: WhoCanReplyProps) {
a.text_sm,
a.leading_tight,
t.atoms.text_contrast_medium,
hovered && a.underline,
pressed && a.underline,
]}>
{description}
</Text>
@@ -120,7 +121,7 @@ export function WhoCanReply({post, isThreadAuthor, style}: WhoCanReplyProps) {
)}
</View>
)}
</Button>
</BottomSheetButton>
{isThreadAuthor ? (
<PostInteractionSettingsDialog