It would be nice if there was a way to have transitions when an icon changes in IconButton.
This would be key to doing that: https://svelte.dev/examples#transition-events.
We could just add another prop:
<IconButton
icon={[
{ name: 'favorite' },
{ name: 'favorite_outline' }
]}
transition="scale"
bind:on
/>
Then, every time on is toggled, the old icon will animate out with a scale transition, and the new one will animate it with a scale.
It would be nice if there was a way to have transitions when an icon changes in
IconButton.This would be key to doing that: https://svelte.dev/examples#transition-events.
We could just add another prop:
Then, every time
onis toggled, the old icon will animate out with ascaletransition, and the new one will animate it with ascale.