Merge remote-tracking branch 'origin/hailey/dialogs-pt1' into hailey/dialogs-pt8

This commit is contained in:
Hailey
2024-10-02 21:19:25 -07:00
3 changed files with 20 additions and 7 deletions
+12
View File
@@ -0,0 +1,12 @@
import React from 'react'
import {Button, ButtonProps} from '#/components/Button'
import {NormalizedRNGHPressable} from '#/components/NormalizedRNGHPressable'
export function BottomSheetButton({children, ...rest}: ButtonProps) {
return (
<Button {...rest} Component={NormalizedRNGHPressable}>
{children}
</Button>
)
}
@@ -6,7 +6,8 @@ import {useLingui} from '@lingui/react'
import {getLabelingServiceTitle} from '#/lib/moderation' import {getLabelingServiceTitle} from '#/lib/moderation'
import {atoms as a, useBreakpoints, useTheme} from '#/alf' import {atoms as a, useBreakpoints, useTheme} from '#/alf'
import {Button, useButtonContext} from '#/components/Button' import {BottomSheetButton} from '#/components/BottomSheetButton'
import {useButtonContext} from '#/components/Button'
import {Divider} from '#/components/Divider' import {Divider} from '#/components/Divider'
import * as LabelingServiceCard from '#/components/LabelingServiceCard' import * as LabelingServiceCard from '#/components/LabelingServiceCard'
import {Text} from '#/components/Typography' import {Text} from '#/components/Typography'
@@ -38,12 +39,12 @@ export function SelectLabelerView({
<View style={[a.gap_sm]}> <View style={[a.gap_sm]}>
{props.labelers.map(labeler => { {props.labelers.map(labeler => {
return ( return (
<Button <BottomSheetButton
key={labeler.creator.did} key={labeler.creator.did}
label={_(msg`Send report to ${labeler.creator.displayName}`)} label={_(msg`Send report to ${labeler.creator.displayName}`)}
onPress={() => props.onSelectLabeler(labeler.creator.did)}> onPress={() => props.onSelectLabeler(labeler.creator.did)}>
<LabelerButton labeler={labeler} /> <LabelerButton labeler={labeler} />
</Button> </BottomSheetButton>
) )
})} })}
</View> </View>
@@ -278,7 +278,7 @@ function AppealForm({
? [a.flex_row, a.justify_between] ? [a.flex_row, a.justify_between]
: [{flexDirection: 'column-reverse'}, a.gap_sm] : [{flexDirection: 'column-reverse'}, a.gap_sm]
}> }>
<Button <BottomSheetButton
testID="backBtn" testID="backBtn"
variant="solid" variant="solid"
color="secondary" color="secondary"
@@ -286,8 +286,8 @@ function AppealForm({
onPress={onPressBack} onPress={onPressBack}
label={_(msg`Back`)}> label={_(msg`Back`)}>
<ButtonText>{_(msg`Back`)}</ButtonText> <ButtonText>{_(msg`Back`)}</ButtonText>
</Button> </BottomSheetButton>
<Button <BottomSheetButton
testID="submitBtn" testID="submitBtn"
variant="solid" variant="solid"
color="primary" color="primary"
@@ -296,7 +296,7 @@ function AppealForm({
label={_(msg`Submit`)}> label={_(msg`Submit`)}>
<ButtonText>{_(msg`Submit`)}</ButtonText> <ButtonText>{_(msg`Submit`)}</ButtonText>
{isPending && <ButtonIcon icon={Loader} />} {isPending && <ButtonIcon icon={Loader} />}
</Button> </BottomSheetButton>
</View> </View>
</> </>
) )