Make the buttons round again (#9367)

* make the base button round

* some miscalleaneous tweaks
This commit is contained in:
Samuel Newman
2025-11-11 02:01:41 +02:00
committed by GitHub
parent 5208aa4a65
commit bcd0e40192
7 changed files with 8 additions and 13 deletions
+1 -3
View File
@@ -434,25 +434,23 @@ export const Button = React.forwardRef<View, ButtonProps>(
} }
if (shape === 'default') { if (shape === 'default') {
baseStyles.push(a.rounded_full)
if (size === 'large') { if (size === 'large') {
baseStyles.push({ baseStyles.push({
paddingVertical: 12, paddingVertical: 12,
paddingHorizontal: 25, paddingHorizontal: 25,
borderRadius: 10,
gap: 3, gap: 3,
}) })
} else if (size === 'small') { } else if (size === 'small') {
baseStyles.push({ baseStyles.push({
paddingVertical: 8, paddingVertical: 8,
paddingHorizontal: 13, paddingHorizontal: 13,
borderRadius: 8,
gap: 3, gap: 3,
}) })
} else if (size === 'tiny') { } else if (size === 'tiny') {
baseStyles.push({ baseStyles.push({
paddingVertical: 5, paddingVertical: 5,
paddingHorizontal: 9, paddingHorizontal: 9,
borderRadius: 6,
gap: 2, gap: 2,
}) })
} }
-1
View File
@@ -129,7 +129,6 @@ export function BackButton({onPress, style, ...props}: Partial<ButtonProps>) {
size="small" size="small"
variant="ghost" variant="ghost"
color="secondary" color="secondary"
shape="square"
onPress={onPressBack} onPress={onPressBack}
hitSlop={HITSLOP_30} hitSlop={HITSLOP_30}
style={[ style={[
+1 -2
View File
@@ -204,8 +204,7 @@ let RepostButtonDialogInner = ({
label={_(msg`Cancel quote post`)} label={_(msg`Cancel quote post`)}
onPress={onPressClose} onPress={onPressClose}
size="large" size="large"
variant="outline" color="secondary">
color="primary">
<ButtonText> <ButtonText>
<Trans>Cancel</Trans> <Trans>Cancel</Trans>
</ButtonText> </ButtonText>
+4 -4
View File
@@ -9,6 +9,7 @@ import Animated, {
} from 'react-native-reanimated' } from 'react-native-reanimated'
import {useSafeAreaInsets} from 'react-native-safe-area-context' import {useSafeAreaInsets} from 'react-native-safe-area-context'
import {type AppBskyActorDefs, type ModerationDecision} from '@atproto/api' import {type AppBskyActorDefs, type ModerationDecision} from '@atproto/api'
import {utils} from '@bsky.app/alf'
import {msg} from '@lingui/macro' import {msg} from '@lingui/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
import {useNavigation} from '@react-navigation/native' import {useNavigation} from '@react-navigation/native'
@@ -26,7 +27,6 @@ import {LoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
import {UserAvatar} from '#/view/com/util/UserAvatar' import {UserAvatar} from '#/view/com/util/UserAvatar'
import {UserBanner} from '#/view/com/util/UserBanner' import {UserBanner} from '#/view/com/util/UserBanner'
import {atoms as a, platform, useTheme} from '#/alf' import {atoms as a, platform, useTheme} from '#/alf'
import {transparentifyColor} from '#/alf/util/colorGeneration'
import {Button} from '#/components/Button' import {Button} from '#/components/Button'
import {useDialogControl} from '#/components/Dialog' import {useDialogControl} from '#/components/Dialog'
import {ArrowLeft_Stroke2_Corner0_Rounded as ArrowLeftIcon} from '#/components/icons/Arrow' import {ArrowLeft_Stroke2_Corner0_Rounded as ArrowLeftIcon} from '#/components/icons/Arrow'
@@ -175,14 +175,14 @@ let ProfileHeaderShell = ({
style={[ style={[
a.align_center, a.align_center,
a.justify_center, a.justify_center,
a.rounded_sm, a.rounded_full,
{ {
width: 31, width: 31,
height: 31, height: 31,
backgroundColor: transparentifyColor('#000', 0.5), backgroundColor: utils.alpha('#000', 0.5),
}, },
hovered && { hovered && {
backgroundColor: transparentifyColor('#000', 0.75), backgroundColor: utils.alpha('#000', 0.75),
}, },
]}> ]}>
<ArrowLeftIcon size="lg" fill="white" /> <ArrowLeftIcon size="lg" fill="white" />
+1 -1
View File
@@ -362,7 +362,7 @@ export function SearchScreenShell({
size="large" size="large"
variant="ghost" variant="ghost"
color="secondary" color="secondary"
style={[a.px_sm]} style={[a.px_sm, a.rounded_sm]}
onPress={onPressCancelSearch} onPress={onPressCancelSearch}
hitSlop={HITSLOP_10}> hitSlop={HITSLOP_10}>
<ButtonText> <ButtonText>
@@ -97,7 +97,7 @@ export function TrendRow({
PressableComponent={Pressable}> PressableComponent={Pressable}>
{({hovered, pressed}) => ( {({hovered, pressed}) => (
<> <>
<SubtleHover hover={hovered || pressed} /> <SubtleHover hover={hovered || pressed} native />
<View style={[gutters, a.w_full, a.py_lg, a.flex_row, a.gap_2xs]}> <View style={[gutters, a.w_full, a.py_lg, a.flex_row, a.gap_2xs]}>
<View style={[a.flex_1, a.gap_xs]}> <View style={[a.flex_1, a.gap_xs]}>
<View style={[a.flex_row]}> <View style={[a.flex_row]}>
-1
View File
@@ -71,7 +71,6 @@ export function ListsScreen({}: Props) {
label={_(msg`New list`)} label={_(msg`New list`)}
testID="newUserListBtn" testID="newUserListBtn"
color="secondary" color="secondary"
variant="solid"
size="small" size="small"
onPress={wrappedOnPressNewList}> onPress={wrappedOnPressNewList}>
<ButtonIcon icon={PlusIcon} /> <ButtonIcon icon={PlusIcon} />