fix: use button properly
This commit is contained in:
parent
b151a5e464
commit
18d3b8d2ff
@ -6,7 +6,6 @@ import type { CallToAction as Props } from 'types';
|
|||||||
const {
|
const {
|
||||||
variant = 'secondary',
|
variant = 'secondary',
|
||||||
target,
|
target,
|
||||||
link,
|
|
||||||
text = Astro.slots.render('default'),
|
text = Astro.slots.render('default'),
|
||||||
icon = '',
|
icon = '',
|
||||||
class: className = '',
|
class: className = '',
|
||||||
@ -32,7 +31,6 @@ const variants = {
|
|||||||
<a
|
<a
|
||||||
class={twMerge(variants[variant] || '', className)}
|
class={twMerge(variants[variant] || '', className)}
|
||||||
{...(target ? { target: target, rel: 'noopener noreferrer' } : {})}
|
{...(target ? { target: target, rel: 'noopener noreferrer' } : {})}
|
||||||
{...(link ? { href: link} : {})}
|
|
||||||
{...rest}
|
{...rest}
|
||||||
>
|
>
|
||||||
<Fragment set:html={text} />
|
<Fragment set:html={text} />
|
||||||
|
@ -154,16 +154,16 @@ const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}`
|
|||||||
</div>
|
</div>
|
||||||
{ !connected && (
|
{ !connected && (
|
||||||
<span class="ml-4 rtl:ml-0 rtl:mr-4">
|
<span class="ml-4 rtl:ml-0 rtl:mr-4">
|
||||||
<Button link='/account/login' variant='primary' class="ml-2 py-2.5 px-5.5 md:px-6 font-semibold shadow-none text-sm w-auto">
|
<Button href='/account/login' variant='primary' class="ml-2 py-2.5 px-5.5 md:px-6 font-semibold shadow-none text-sm w-auto">
|
||||||
Connexion
|
Connexion
|
||||||
</Button>
|
</Button>
|
||||||
<Button link='/account/register' variant='secondary' class="ml-2 py-2.5 px-5.5 md:px-6 font-semibold shadow-none text-sm w-auto">
|
<Button href='/account/register' variant='secondary' class="ml-2 py-2.5 px-5.5 md:px-6 font-semibold shadow-none text-sm w-auto">
|
||||||
Inscription
|
Inscription
|
||||||
</Button>
|
</Button>
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{ connected && (
|
{ connected && (
|
||||||
<Button link='/account/logout' variant='primary' class="ml-2 py-2.5 px-5.5 md:px-6 font-semibold shadow-none text-sm w-auto">
|
<Button href='/account/logout' variant='primary' class="ml-2 py-2.5 px-5.5 md:px-6 font-semibold shadow-none text-sm w-auto">
|
||||||
Déconnexion
|
Déconnexion
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user