feat: implement IconButton component and update SSOLogin to use it
This commit is contained in:
parent
820c84cd8c
commit
b81210d2ea
4 changed files with 70 additions and 51 deletions
|
@ -3,26 +3,24 @@ import { Button } from '@/components/ui/button';
|
|||
|
||||
export default function LoginForm() {
|
||||
return (
|
||||
<div>
|
||||
<form className='flex flex-col gap-4'>
|
||||
<LabeledInput
|
||||
type='email'
|
||||
label='E-Mail'
|
||||
placeholder='Enter your E-Mail'
|
||||
/>
|
||||
<LabeledInput
|
||||
type='password'
|
||||
label='Password'
|
||||
placeholder='Enter your Password'
|
||||
/>
|
||||
<Button
|
||||
className='hover:bg-blue-600 hover:text-white'
|
||||
type='submit'
|
||||
variant='secondary'
|
||||
>
|
||||
Login
|
||||
</Button>
|
||||
</form>
|
||||
</div>
|
||||
<form className='flex flex-col gap-4 w-7/8'>
|
||||
<LabeledInput
|
||||
type='email'
|
||||
label='E-Mail'
|
||||
placeholder='Enter your E-Mail'
|
||||
/>
|
||||
<LabeledInput
|
||||
type='password'
|
||||
label='Password'
|
||||
placeholder='Enter your Password'
|
||||
/>
|
||||
<Button
|
||||
className='hover:bg-blue-600 hover:text-white'
|
||||
type='submit'
|
||||
variant='secondary'
|
||||
>
|
||||
Login
|
||||
</Button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { signIn } from '@/auth';
|
||||
import { Button } from '@/components/ui/button';
|
||||
//import { faOpenid } from '@fortawesome/free-brands-svg-icons';
|
||||
import { IconButton } from '@/components/icon-button';
|
||||
import { faOpenid } from '@fortawesome/free-brands-svg-icons';
|
||||
|
||||
export default function SSOLogin({
|
||||
provider,
|
||||
|
@ -11,19 +11,20 @@ export default function SSOLogin({
|
|||
}) {
|
||||
return (
|
||||
<form
|
||||
className='flex flex-col items-center gap-4 w-full'
|
||||
className='flex flex-col items-center gap-4 w-7/8'
|
||||
action={async () => {
|
||||
'use server';
|
||||
await signIn(provider);
|
||||
}}
|
||||
>
|
||||
<Button
|
||||
<IconButton
|
||||
className='w-full'
|
||||
type='submit'
|
||||
variant='default' /*icon={faOpenid}*/
|
||||
variant='default'
|
||||
icon={faOpenid}
|
||||
>
|
||||
Login with {providerDisplayName}
|
||||
</Button>
|
||||
</IconButton>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue