Created
September 28, 2020 18:51
-
-
Save lega911/df8f752ffdbd5531b2ff9449d93a186b to your computer and use it in GitHub Desktop.
Property $class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
import Child from './Child.xht'; | |
let cond = true; | |
</script> | |
<input type="checkbox" :checked={cond} /> | |
<Child class="red italic" class:bold={cond} /> | |
<style> | |
.red {color: red;} | |
.italic {font-style: italic;} | |
.bold {font-weight: bold;} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class={$class}> | |
Child | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment