mirror of
https://github.com/tabler/tabler.git
synced 2026-10-12 21:27:06 +04:00
21 lines
479 B
Plaintext
21 lines
479 B
Plaintext
---
|
|
import Icon from './Icon.astro'
|
|
|
|
interface Props {
|
|
text?: string
|
|
top?: boolean
|
|
color?: string
|
|
class?: string
|
|
/** remaining attributes (id, data-*, aria-*, …) are forwarded to the root element */
|
|
[key: string]: unknown
|
|
}
|
|
|
|
const { text, top, color, class: className, ...rest } = Astro.props
|
|
|
|
const classes = ['ribbon', top && 'ribbon-top', color && `bg-${color}`, className]
|
|
---
|
|
|
|
<div class:list={classes} {...rest}>
|
|
{text ? text : <Icon name="star" />}
|
|
</div>
|