Skip to content

Commit

Permalink
fix(RequirementConnectButton): accept ButtonProps
Browse files Browse the repository at this point in the history
  • Loading branch information
BrickheadJohnny committed Jul 11, 2024
1 parent 3aa6e44 commit 4baf3fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function requirementTypeToPlatformName(type: RequirementType): PlatformName {
return REQUIREMENTS[type].types[0].split("_")[0] as PlatformName
}

const RequirementConnectButton = () => {
const RequirementConnectButton = ({ className, ...props }: ButtonProps) => {
const { platformUsers, emails, farcasterProfiles } = useUser()
const { type, roleId, id } = useRequirementContext()
const platform = requirementTypeToPlatformName(type)
Expand Down Expand Up @@ -68,12 +68,13 @@ const RequirementConnectButton = () => {
<ButtonComponent
isReconnection={isReconnection}
onSuccess={onSuccess}
className="gap-1"
className={cn("gap-1", className)}
size="xs"
// TODO: find a better solution for handling the icon
{...(platform === "EMAIL" || platform === "FARCASTER"
? undefined
: { icon: rewards[platform]?.icon })}
{...props}
/>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const RequirementAccessIndicator = () => {
) : type.startsWith("GITCOIN_") ? (
<DynamicSetupPassport size="sm" />
) : (
<DynamicConnectRequirementPlatformButton size="sm" iconSpacing={2} />
<DynamicConnectRequirementPlatformButton className="gap-2" size="sm" />
)}
</PopoverFooter>
</RequirementAccessIndicatorUI>
Expand Down

0 comments on commit 4baf3fa

Please sign in to comment.