fix: deduplicate different buttons

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-03-08 20:21:19 +01:00
parent 160f0f8297
commit aa6bd2a884
12 changed files with 44 additions and 194 deletions

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import type { AuthProvider, AuthProviderWithCustomName } from '../../../api/config/types'
import { SocialLinkButton } from './social-link-button/social-link-button'
import { IconButton } from '../../common/icon-button/icon-button'
import { getOneClickProviderMetadata } from './utils/get-one-click-provider-metadata'
import React, { useMemo } from 'react'
@ -22,8 +22,8 @@ export const ViaOneClick: React.FC<ViaOneClickProps> = ({ provider }) => {
const text = (provider as AuthProviderWithCustomName).providerName || name
return (
<SocialLinkButton backgroundClass={className} icon={icon} href={url} title={text}>
<IconButton className={className} icon={icon} href={url} title={text} border={true}>
{text}
</SocialLinkButton>
</IconButton>
)
}