Clarify prop names

This commit is contained in:
Eric Bailey
2026-03-10 13:10:35 -05:00
parent 801bef548e
commit a390455b32
3 changed files with 22 additions and 19 deletions
+11 -8
View File
@@ -14,11 +14,11 @@ import type * as bsky from '#/types/bsky'
export function BotBadge({ export function BotBadge({
profile, profile,
alwaysShow = false, alwaysShow = false,
size, width,
}: { }: {
profile: bsky.profile.AnyProfileView profile: bsky.profile.AnyProfileView
alwaysShow?: boolean alwaysShow?: boolean
size: number width: number
}) { }) {
const t = useTheme() const t = useTheme()
@@ -28,17 +28,17 @@ export function BotBadge({
return ( return (
<View> <View>
<RobotIcon width={size} fill={t.atoms.text_contrast_medium.color} /> <RobotIcon width={width} fill={t.atoms.text_contrast_medium.color} />
</View> </View>
) )
} }
export function BotBadgeButton({ export function BotBadgeButton({
profile, profile,
size, width,
}: { }: {
profile: bsky.profile.AnyProfileView profile: bsky.profile.AnyProfileView
size: number width: number
}) { }) {
const t = useTheme() const t = useTheme()
const ax = useAnalytics() const ax = useAnalytics()
@@ -66,12 +66,15 @@ export function BotBadgeButton({
a.align_end, a.align_end,
a.transition_transform, a.transition_transform,
{ {
width: size, width: width,
height: size, height: width,
transform: [{scale: hovered ? 1.1 : 1}], transform: [{scale: hovered ? 1.1 : 1}],
}, },
]}> ]}>
<RobotIcon width={size} fill={t.atoms.text_contrast_medium.color} /> <RobotIcon
width={width}
fill={t.atoms.text_contrast_medium.color}
/>
</View> </View>
)} )}
</Button> </Button>
+3 -3
View File
@@ -57,9 +57,9 @@ export function ProfileBadges({
<> <>
<VerificationCheckButton <VerificationCheckButton
profile={shadowed} profile={shadowed}
size={verificationIconSizes[size]} width={verificationIconSizes[size]}
/> />
<BotBadgeButton profile={shadowed} size={botIconSizes[size]} /> <BotBadgeButton profile={shadowed} width={botIconSizes[size]} />
</> </>
) : ( ) : (
<> <>
@@ -69,7 +69,7 @@ export function ProfileBadges({
width={verificationIconSizes[size]} width={verificationIconSizes[size]}
/> />
)} )}
<BotBadge profile={shadowed} size={botIconSizes[size]} /> <BotBadge profile={shadowed} width={botIconSizes[size]} />
</> </>
)} )}
</View> </View>
@@ -51,17 +51,17 @@ export function shouldShowVerificationCheckButton(
export function VerificationCheckButton({ export function VerificationCheckButton({
profile, profile,
size, width,
}: { }: {
profile: Shadow<bsky.profile.AnyProfileView> profile: Shadow<bsky.profile.AnyProfileView>
size: number width: number
}) { }) {
const state = useFullVerificationState({ const state = useFullVerificationState({
profile, profile,
}) })
if (shouldShowVerificationCheckButton(state)) { if (shouldShowVerificationCheckButton(state)) {
return <Badge profile={profile} verificationState={state} size={size} /> return <Badge profile={profile} verificationState={state} width={width} />
} }
return null return null
@@ -70,11 +70,11 @@ export function VerificationCheckButton({
function Badge({ function Badge({
profile, profile,
verificationState: state, verificationState: state,
size, width,
}: { }: {
profile: Shadow<bsky.profile.AnyProfileView> profile: Shadow<bsky.profile.AnyProfileView>
verificationState: FullVerificationState verificationState: FullVerificationState
size: number width: number
}) { }) {
const t = useTheme() const t = useTheme()
const ax = useAnalytics() const ax = useAnalytics()
@@ -109,8 +109,8 @@ function Badge({
a.align_end, a.align_end,
a.transition_transform, a.transition_transform,
{ {
width: size, width: width,
height: size, height: width,
transform: [ transform: [
{ {
scale: hovered ? 1.1 : 1, scale: hovered ? 1.1 : 1,
@@ -119,7 +119,7 @@ function Badge({
}, },
]}> ]}>
<VerificationCheck <VerificationCheck
width={size} width={width}
fill={ fill={
verifiedByHidden verifiedByHidden
? t.atoms.bg_contrast_100.backgroundColor ? t.atoms.bg_contrast_100.backgroundColor