mirror of https://github.com/sveltejs/svelte
20 lines
255 B
20 lines
255 B
7 years ago
|
{#if visible}
|
||
|
<div transition:foo></div>
|
||
|
{/if}
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
transitions: {
|
||
|
foo(node, params) {
|
||
|
return () => {
|
||
|
return {
|
||
|
duration: 100,
|
||
|
tick: t => {
|
||
|
node.foo = t;
|
||
|
}
|
||
|
};
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
</script>
|