mirror of
https://github.com/tabler/tabler.git
synced 2026-10-12 13:17:00 +04:00
21 lines
595 B
Plaintext
21 lines
595 B
Plaintext
---
|
|
import { freeIllustrationSource, illustrationSvg, type IllustrationImage } from '@shared/lib/svg'
|
|
|
|
interface Props {
|
|
/** file name of the illustration, e.g. "boy-girl.svg" (the ".svg" suffix is stripped) */
|
|
image: IllustrationImage
|
|
height?: number | string
|
|
class?: string
|
|
}
|
|
|
|
const { image, height = 128, class: className } = Astro.props
|
|
|
|
const source = freeIllustrationSource(image)
|
|
|
|
const illustration = illustrationSvg(source, { ...(className ? { classes: className } : {}), height })
|
|
---
|
|
|
|
<!-- BEGIN ILLUSTRATION -->
|
|
<Fragment set:html={illustration} />
|
|
<!-- END ILLUSTRATION -->
|