Make color prop reactive
r2dev2 opened this issue · comments
The color prop currently isn't reactive as shown by this example in which the color doesn't switch.
<script>
import { Button } from "smelte";
export let name;
let color = 'primary';
const switchColor = () => {
console.log('switching color');
color = color == 'primary' ? 'secondary': 'primary';
};
</script>
<Button {color} on:click={switchColor}>
Test Button
</Button>
It would be nice if the color
prop was reactive. Also, is the current non-reactivity intentional or not?