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

25 lines
390 B
Svelte
Raw Normal View History

<script>
import Icon from '../../../';
export let icon;
export let expose;
export let onLoad;
const props = {
2021-11-10 11:18:35 +00:00
icon
};
$: {
expose(swap);
}
function swap() {
props.hFlip = true;
props.style = {
color: 'red'
}
}
</script>
2021-11-10 11:18:35 +00:00
<Icon {...props} on:load={event => {
onLoad?.(event.detail.icon)
}} />