Add Button to LoginProvider

This commit is contained in:
Cédric FAMIBELLE-PRONZOLA
2022-10-31 23:01:33 +04:00
parent a20d0d4142
commit 4de3bb1f97
2 changed files with 19 additions and 15 deletions
+12 -8
View File
@@ -3,6 +3,7 @@ import Link from 'next/link'
import Image from 'next/image'
import {signIn} from 'next-auth/react'
import {useTheme} from '@mui/material/styles'
import Button from '@mui/material/Button'
export default function LoginProvider({id, title, width, height, callbackUrl}) {
const theme = useTheme()
@@ -16,14 +17,17 @@ export default function LoginProvider({id, title, width, height, callbackUrl}) {
return (
<Link passHref href='/api/auth/signin'>
<Image
style={{cursor: 'pointer'}}
width={width}
height={height}
alt={title}
src={`/images/${id === 'github' ? `${id}-${theme.palette.mode}` : id}.svg`}
onClick={hanleClick}
/>
<Button variant='outlined' color='inherit' startIcon={
<Image
width={width}
height={height}
alt={title}
src={`/images/${id === 'github' ? `${id}-${theme.palette.mode}` : id}.svg`}
/>
} onClick={hanleClick}
>
{title}
</Button>
</Link>
)
}