mirror of
https://github.com/tabler/tabler.git
synced 2026-10-12 05:06:55 +04:00
18 lines
576 B
Plaintext
18 lines
576 B
Plaintext
---
|
|
interface Props {
|
|
color?: string
|
|
animated?: boolean
|
|
/** accessible name (visually-hidden text inside the dot) */
|
|
ariaLabel?: string
|
|
class?: string
|
|
/** remaining attributes (id, data-*, aria-*, …) are forwarded to the root element */
|
|
[key: string]: unknown
|
|
}
|
|
|
|
const { color, animated, ariaLabel, class: className, ...rest } = Astro.props
|
|
|
|
const classes = ['status-dot', color && `status-${color}`, animated && 'status-dot-animated', className]
|
|
---
|
|
|
|
<span class:list={classes} {...rest}>{ariaLabel && <span class="visually-hidden">{ariaLabel}</span>}</span>
|