polymech-astro/packages/imagetools_3/components/BackgroundPicture.astro
2025-08-26 12:17:29 +02:00

20 lines
507 B
Plaintext

---
import renderBackgroundPicture from "../api/renderBackgroundPicture.js";
import { BackgroundPictureConfigOptions } from "../types.d";
declare interface Props
extends Pick<
BackgroundPictureConfigOptions,
Exclude<keyof BackgroundPictureConfigOptions, "content">
> {}
const content = await Astro.slots.render("default");
const { link, style, htmlElement } = await renderBackgroundPicture({
content,
...(Astro.props as Props),
});
---
<Fragment set:html={link + style + htmlElement} />