polymech-astro/packages/imagetools/components/BackgroundPicture.astro
2025-08-15 20:42:02 +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} />