22 lines
388 B
Plaintext

---
interface Props<T extends Record<string, any>> {
wrapper: (props: T) => any;
props?: T;
condition: boolean;
}
const { wrapper: Wrapper, condition, props } = Astro.props;
---
{/* ------------------------------------------- HTML ------------------------------------------- */}
{
condition ? (
<Wrapper {...props}>
<slot />
</Wrapper>
) : (
<slot />
)
}