feat: support f-partial on buttons (#1867)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { Partial } from "$fresh/runtime.ts";
|
||||
import { Fader } from "../../islands/Fader.tsx";
|
||||
|
||||
export default function ModeDemo() {
|
||||
return (
|
||||
<div f-client-nav>
|
||||
<Partial name="body">
|
||||
<Fader>
|
||||
<p class="status-initial">Initial content</p>
|
||||
</Fader>
|
||||
</Partial>
|
||||
<p>
|
||||
<button f-partial="/button/update">
|
||||
update
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { defineRoute } from "$fresh/src/server/defines.ts";
|
||||
import { RouteConfig } from "$fresh/server.ts";
|
||||
import { Partial } from "$fresh/runtime.ts";
|
||||
import { Fader } from "../../islands/Fader.tsx";
|
||||
|
||||
export const config: RouteConfig = {
|
||||
skipAppWrapper: true,
|
||||
skipInheritedLayouts: true,
|
||||
};
|
||||
|
||||
export default defineRoute((req, ctx) => {
|
||||
return (
|
||||
<Partial name="body">
|
||||
<Fader>
|
||||
<p class="status-updated">update</p>
|
||||
</Fader>
|
||||
</Partial>
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user