2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-14 06:28:24 +00:00
iconify/packages/svelte/tests/api/fixtures/ChangeIcon.svelte

19 lines
297 B
Svelte
Raw Normal View History

2021-05-01 20:38:56 +00:00
<script>
import Icon from '../../../dist/';
2021-05-01 20:38:56 +00:00
export let icon1;
export let icon2;
export let expose;
export let onLoad;
2021-05-01 20:38:56 +00:00
let icon = icon1;
$: {
expose(swap);
}
function swap() {
icon = icon2;
}
</script>
<Icon icon={icon} onLoad={onLoad} />