initial recommit

This commit is contained in:
2025-04-22 11:30:05 +02:00
parent d37de6d304
commit 9e17369f11
49 changed files with 13964 additions and 3952 deletions

View File

@ -0,0 +1,35 @@
---
import { objectOmit } from '@dzeio/object-util'
import type ButtonProps from './Props'
export interface Props extends ButtonProps {}
const classes = [
"button",
{outline: Astro.props.outline},
{ghost: Astro.props.ghost},
Astro.props.class
]
---
{'href' in Astro.props && (
<a class:list={classes} {...objectOmit(Astro.props, 'type') as any}>
<slot />
</a>
) || (
<button class:list={classes} {...objectOmit(Astro.props, 'type') as any}>
<slot />
</button>
)}
<style>
.button {
@apply outline-none inline-flex px-4 py-2 rounded-lg bg-amber-500 hover:bg-amber-600 active:bg-amber-700 text-white font-medium transition-colors
}
.button.outline {
@apply bg-transparent border-2 text-amber-500 border-gray-200 hover:bg-gray-100 active:bg-gray-200 active:border-gray-300
}
.button.ghost {
@apply text-black bg-transparent hover:bg-gray-200 active:bg-gray-300
}
</style>

View File

@ -0,0 +1,29 @@
---
import { objectOmit } from '@dzeio/object-util'
import type ButtonProps from './Props'
export interface Props extends ButtonProps {}
const classes = [
"button",
{outline: Astro.props.outline},
{ghost: Astro.props.ghost},
Astro.props.class
]
---
{'href' in Astro.props && (
<a class:list={classes} {...objectOmit(Astro.props, 'type') as any}>
<slot />
</a>
) || (
<button class:list={classes} {...objectOmit(Astro.props, 'type') as any}>
<slot />
</button>
)}
<style>
.button {
@apply inline-flex px-4 py-2 rounded-lg bg-gtk-neutral-200 hover:bg-gray-300 active:bg-gray-400 focus:outline-2 focus:outline outline-gtk-blue-300 text-black font-medium transition-all
}
</style>

View File

@ -0,0 +1,4 @@
export default interface Props extends astroHTML.JSX.AnchorHTMLAttributes {
outline?: boolean
ghost?: boolean
}

View File

@ -0,0 +1,35 @@
---
import { objectOmit } from '@dzeio/object-util'
import type ButtonProps from './Props'
export interface Props extends ButtonProps {}
const classes = [
"button",
{outline: Astro.props.outline},
{ghost: Astro.props.ghost},
Astro.props.class
]
---
{'href' in Astro.props && (
<a class:list={classes} {...objectOmit(Astro.props, 'type') as any}>
<slot />
</a>
) || (
<button class:list={classes} {...objectOmit(Astro.props, 'type') as any}>
<slot />
</button>
)}
<style>
.button {
@apply outline-none inline-flex px-4 py-2 rounded-lg bg-amber-500 hover:bg-amber-600 active:bg-amber-700 text-white font-medium transition-colors
}
.button.outline {
@apply bg-transparent border-2 text-amber-500 border-gray-200 hover:bg-gray-100 active:bg-gray-200 active:border-gray-300
}
.button.ghost {
@apply text-black bg-transparent hover:bg-gray-200 active:bg-gray-300
}
</style>