mirror of https://github.com/sveltejs/svelte
parent
3c1fc0c80d
commit
b2f505c14e
@ -1,6 +0,0 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
html: `<div>Hello</div>`,
|
||||
ssrHtml: `<div>Test</div>`
|
||||
});
|
||||
@ -1,12 +0,0 @@
|
||||
<script>
|
||||
import { writable } from "svelte/store";
|
||||
import { fade } from "svelte/transition";
|
||||
|
||||
const store = writable('Hello');
|
||||
|
||||
const action = (node, text) => {
|
||||
node.textContent = text
|
||||
}
|
||||
</script>
|
||||
|
||||
<div use:action={$store}>Test</div>
|
||||
@ -1,9 +1,11 @@
|
||||
<script>
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
let action = writable((node) => {
|
||||
node.textContent = 'mounted';
|
||||
let action = writable((node, text) => {
|
||||
node.textContent = text;
|
||||
});
|
||||
|
||||
let text = writable('mounted')
|
||||
</script>
|
||||
|
||||
<div use:$action>hello</div>
|
||||
<div use:$action={$text}>hello</div>
|
||||
|
||||
Loading…
Reference in new issue