You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/transition-js-slot-6-spread.../main.svelte

27 lines
578 B

<script>
import Nested from './Nested.svelte';
import Nested2 from './Nested2.svelte';
let visible = true;
let state = 'Foo';
let slotProps = { slotProps: 'Foo' };
export let props;
export function show() {
visible = true;
}
export function hide() {
visible = false;
state = 'Bar';
slotProps = { slotProps: 'Bar' };
}
</script>
<div>outside {state} {props} {slotProps.slotProps}</div>
<Nested {visible} {slotProps} let:slotProps>
inside {state} {props} {slotProps}
</Nested>
<Nested2 {visible} let:slotProps>
inside {state} {props} {slotProps}
</Nested2>