mirror of https://github.com/sveltejs/svelte
parent
5638a7631b
commit
5bee31fde6
@ -0,0 +1,18 @@
|
||||
{{#if visible}}
|
||||
<div in:fade>fades in</div>
|
||||
{{/if}}
|
||||
|
||||
<script>
|
||||
export default {
|
||||
transitions: {
|
||||
fade: function ( node, params ) {
|
||||
return {
|
||||
duration: 400,
|
||||
tick: t => {
|
||||
node.style.opacity = t;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,3 +0,0 @@
|
||||
{{#if visible}}
|
||||
<div in:style='{opacity: 0}'>fades in</div>
|
||||
{{/if}}
|
Loading…
Reference in new issue