Skip to content

Instantly share code, notes, and snippets.

@lega911
Created September 28, 2020 22:28
Show Gist options
  • Save lega911/dd1727edd04661badb535caa0a88b8fa to your computer and use it in GitHub Desktop.
Save lega911/dd1727edd04661badb535caa0a88b8fa to your computer and use it in GitHub Desktop.
Attach a class 2
<script>
import Button from './Button.xht';
</script>
<Button .btn="red bold" name="Red bold" />
<Button .btn="purple" name="Purple" />
<Button name="Default" />
<style>
.red {color: red;}
.purple {color: purple;}
.bold {font-weight: bold;}
</style>
<script>
export let name;
</script>
<button class="btn">{name}</button>
<style>
.btn {font-style: italic;}
:export(.btn) {color: deepskyblue;}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment