Clarify prop names
This commit is contained in:
@@ -14,11 +14,11 @@ import type * as bsky from '#/types/bsky'
|
||||
export function BotBadge({
|
||||
profile,
|
||||
alwaysShow = false,
|
||||
size,
|
||||
width,
|
||||
}: {
|
||||
profile: bsky.profile.AnyProfileView
|
||||
alwaysShow?: boolean
|
||||
size: number
|
||||
width: number
|
||||
}) {
|
||||
const t = useTheme()
|
||||
|
||||
@@ -28,17 +28,17 @@ export function BotBadge({
|
||||
|
||||
return (
|
||||
<View>
|
||||
<RobotIcon width={size} fill={t.atoms.text_contrast_medium.color} />
|
||||
<RobotIcon width={width} fill={t.atoms.text_contrast_medium.color} />
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
export function BotBadgeButton({
|
||||
profile,
|
||||
size,
|
||||
width,
|
||||
}: {
|
||||
profile: bsky.profile.AnyProfileView
|
||||
size: number
|
||||
width: number
|
||||
}) {
|
||||
const t = useTheme()
|
||||
const ax = useAnalytics()
|
||||
@@ -66,12 +66,15 @@ export function BotBadgeButton({
|
||||
a.align_end,
|
||||
a.transition_transform,
|
||||
{
|
||||
width: size,
|
||||
height: size,
|
||||
width: width,
|
||||
height: width,
|
||||
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>
|
||||
)}
|
||||
</Button>
|
||||
|
||||
@@ -57,9 +57,9 @@ export function ProfileBadges({
|
||||
<>
|
||||
<VerificationCheckButton
|
||||
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]}
|
||||
/>
|
||||
)}
|
||||
<BotBadge profile={shadowed} size={botIconSizes[size]} />
|
||||
<BotBadge profile={shadowed} width={botIconSizes[size]} />
|
||||
</>
|
||||
)}
|
||||
</View>
|
||||
|
||||
@@ -51,17 +51,17 @@ export function shouldShowVerificationCheckButton(
|
||||
|
||||
export function VerificationCheckButton({
|
||||
profile,
|
||||
size,
|
||||
width,
|
||||
}: {
|
||||
profile: Shadow<bsky.profile.AnyProfileView>
|
||||
size: number
|
||||
width: number
|
||||
}) {
|
||||
const state = useFullVerificationState({
|
||||
profile,
|
||||
})
|
||||
|
||||
if (shouldShowVerificationCheckButton(state)) {
|
||||
return <Badge profile={profile} verificationState={state} size={size} />
|
||||
return <Badge profile={profile} verificationState={state} width={width} />
|
||||
}
|
||||
|
||||
return null
|
||||
@@ -70,11 +70,11 @@ export function VerificationCheckButton({
|
||||
function Badge({
|
||||
profile,
|
||||
verificationState: state,
|
||||
size,
|
||||
width,
|
||||
}: {
|
||||
profile: Shadow<bsky.profile.AnyProfileView>
|
||||
verificationState: FullVerificationState
|
||||
size: number
|
||||
width: number
|
||||
}) {
|
||||
const t = useTheme()
|
||||
const ax = useAnalytics()
|
||||
@@ -109,8 +109,8 @@ function Badge({
|
||||
a.align_end,
|
||||
a.transition_transform,
|
||||
{
|
||||
width: size,
|
||||
height: size,
|
||||
width: width,
|
||||
height: width,
|
||||
transform: [
|
||||
{
|
||||
scale: hovered ? 1.1 : 1,
|
||||
@@ -119,7 +119,7 @@ function Badge({
|
||||
},
|
||||
]}>
|
||||
<VerificationCheck
|
||||
width={size}
|
||||
width={width}
|
||||
fill={
|
||||
verifiedByHidden
|
||||
? t.atoms.bg_contrast_100.backgroundColor
|
||||
|
||||
Reference in New Issue
Block a user