mirror of
https://github.com/zen-browser/www.git
synced 2025-07-10 10:15:31 +02:00
fix: format code and ensure consistent styling across files
This commit is contained in:
parent
2a9df52722
commit
d14b44b2c8
43 changed files with 14294 additions and 11609 deletions
|
@ -1,23 +1,63 @@
|
|||
---
|
||||
const { class: className, isPrimary, isAlert, isBordered, href, id, extra } = Astro.props;
|
||||
const {
|
||||
class: className,
|
||||
isPrimary,
|
||||
isAlert,
|
||||
isBordered,
|
||||
href,
|
||||
id,
|
||||
extra,
|
||||
} = Astro.props
|
||||
---
|
||||
|
||||
{href ? (
|
||||
<a id={id} {...extra} href={href} class:list={['px-6 py-2 flex gap-2 items-center justify-center rounded-full transition-transform duration-200', className, isPrimary ? 'bg-dark text-paper' : isAlert ? 'bg-red-300 text-dark' : !isBordered ? 'hover:bg-dark border-2 border-dark hover:text-paper' : 'border-2 border-dark hover:bg-dark hover:shadow-sm hover:text-paper !transition-bg']} >
|
||||
<slot />
|
||||
</a>
|
||||
) : (
|
||||
<button id={id} {...extra} class:list={['px-6 py-2 flex gap-2 items-center justify-center rounded-full transition-transform duration-200', className, isPrimary ? 'bg-dark text-paper' : isAlert ? 'bg-red-300 text-dark' : !isBordered ? 'hover:bg-dark border-2 border-dark hover:text-paper' : 'border-2 border-dark hover:bg-dark hover:shadow-sm hover:text-paper !transition-bg']} >
|
||||
<slot />
|
||||
</button>
|
||||
)}
|
||||
{
|
||||
href ? (
|
||||
<a
|
||||
id={id}
|
||||
{...extra}
|
||||
href={href}
|
||||
class:list={[
|
||||
'flex items-center justify-center gap-2 rounded-full px-6 py-2 transition-transform duration-200',
|
||||
className,
|
||||
isPrimary
|
||||
? 'bg-dark text-paper'
|
||||
: isAlert
|
||||
? 'bg-red-300 text-dark'
|
||||
: !isBordered
|
||||
? 'border-2 border-dark hover:bg-dark hover:text-paper'
|
||||
: '!transition-bg border-2 border-dark hover:bg-dark hover:text-paper hover:shadow-sm',
|
||||
]}
|
||||
>
|
||||
<slot />
|
||||
</a>
|
||||
) : (
|
||||
<button
|
||||
id={id}
|
||||
{...extra}
|
||||
class:list={[
|
||||
'flex items-center justify-center gap-2 rounded-full px-6 py-2 transition-transform duration-200',
|
||||
className,
|
||||
isPrimary
|
||||
? 'bg-dark text-paper'
|
||||
: isAlert
|
||||
? 'bg-red-300 text-dark'
|
||||
: !isBordered
|
||||
? 'border-2 border-dark hover:bg-dark hover:text-paper'
|
||||
: '!transition-bg border-2 border-dark hover:bg-dark hover:text-paper hover:shadow-sm',
|
||||
]}
|
||||
>
|
||||
<slot />
|
||||
</button>
|
||||
)
|
||||
}
|
||||
<style>
|
||||
button, a {
|
||||
font-size: .9rem;
|
||||
|
||||
button,
|
||||
a {
|
||||
font-size: 0.9rem;
|
||||
|
||||
&[disabled] {
|
||||
cursor: not-allowed;
|
||||
opacity: .5;
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue