mirror of
https://github.com/tabler/tabler.git
synced 2026-08-07 03:42:27 +04:00
8962710163
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
24 lines
755 B
Plaintext
24 lines
755 B
Plaintext
---
|
|
// Decorative card corner stamp (.card-stamp > .card-stamp-icon).
|
|
import Icon from './Icon.astro'
|
|
|
|
interface Props {
|
|
icon?: string
|
|
/** card-stamp-{size}; only 'lg' exists in SCSS (13rem instead of 7rem) */
|
|
size?: string
|
|
/** bg-{color} on the icon wrapper; SCSS default is secondary */
|
|
color?: string
|
|
/** text-{textColor} on the icon wrapper (e.g. color="white" textColor="primary") */
|
|
textColor?: string
|
|
class?: string
|
|
}
|
|
|
|
const { icon = 'star', size, color, textColor, class: className } = Astro.props
|
|
---
|
|
|
|
<div class:list={['card-stamp', size && `card-stamp-${size}`, className]}>
|
|
<div class:list={['card-stamp-icon', color && `bg-${color}`, textColor && `text-${textColor}`]}>
|
|
<slot><Icon name={icon} /></slot>
|
|
</div>
|
|
</div>
|