mirror of
https://github.com/tabler/tabler.git
synced 2026-08-29 13:21:29 +04:00
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
18 lines
517 B
Plaintext
18 lines
517 B
Plaintext
---
|
|
import type { AvatarSize } from './Avatar.astro'
|
|
|
|
interface Props {
|
|
flag?: string | undefined
|
|
/** core/scss/_variables.scss `$flag-sizes` (aliased to `$avatar-sizes`) */
|
|
size?: AvatarSize | undefined
|
|
class?: string
|
|
label?: string | undefined
|
|
}
|
|
|
|
const { flag = 'pl', size, class: className, label } = Astro.props
|
|
|
|
const classes = ['flag', size && `flag-${size}`, `flag-country-${flag.toLowerCase()}`, className]
|
|
---
|
|
|
|
<span class:list={classes} role={label ? 'img' : undefined} aria-label={label}></span>
|