I created two components:
1. btn.svelte
<button class="btn" />
2. btnHold.svelte
<script>
import Btn from './btn.svelte';
</script>
I'm trying to add a new class btn--hold
to btn.svelte
<Btn class="{btn} btn--hold" />
I get an error on class
.
Basically I would like in the end to have:
<button class="btn btn--hold" />
How can I add a class to an imported component?
<Btn class="btn-hold" text />
– Elizaelizabet