add multiple class toggles example

This answers the immediate question I had when I first saw the `class:foo` syntax.
pull/2517/head
Scotty Simpson 6 years ago committed by GitHub
parent e7885f2cb1
commit 1865710095
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -600,6 +600,9 @@ A `class:` directive provides a shorter way of toggling a class on an element.
<!-- Shorthand, for when name and value match --> <!-- Shorthand, for when name and value match -->
<div class:active>...</div> <div class:active>...</div>
<!-- Multiple class toggles can be included -->
<div class:active class:inactive={!active} class:is-admin>...</div>
``` ```

Loading…
Cancel
Save