Add Partials (#1824)

This commit is contained in:
Marvin Hagemeister
2023-09-27 13:34:30 +02:00
committed by GitHub
parent d9829e25e6
commit 665d35bbc2
92 changed files with 3271 additions and 116 deletions
@@ -0,0 +1,36 @@
import { Partial } from "$fresh/runtime.ts";
import { Fader } from "../../islands/Fader.tsx";
import Stateful from "../../islands/Stateful.tsx";
import { Keyed } from "../../components/Keyed.tsx";
export default function SlotDemo() {
return (
<div>
<Partial name="slot-1">
<Fader>
<p>Initial content</p>
{[
<Keyed key="A">
<Stateful id="A" />
</Keyed>,
<Keyed key="B">
<Stateful id="B" />
</Keyed>,
<Keyed key="C">
<Stateful id="C" />
</Keyed>,
]}
</Fader>
</Partial>
<p>
<a
class="swap-link"
href="/keys_components/injected"
fh-partial="/keys_components/swap"
>
swap
</a>
</p>
</div>
);
}