Skip to content

Commit

Permalink
Docs: Interactivity API - missing styles in the sample code (#66253)
Browse files Browse the repository at this point in the history
Co-authored-by: atachibana <atachibana@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
  • Loading branch information
3 people authored Jan 14, 2025
1 parent 1b188a9 commit 669662c
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ Take, for example, this interactive block with two buttons and a paragraph:
<p id="status-paragraph" class="inactive" hidden>this is inactive</p>
</div>

<style>
.active {
color: green;
}
.inactive {
color: red;
}
</style>

<script>
const showHideBtn = document.getElementById( 'show-hide-btn' );
const activateBtn = document.getElementById( 'activate-btn' );
Expand Down Expand Up @@ -101,6 +110,15 @@ The declarative approach simplifies the process by focusing on _what_ should hap
this is inactive
</p>
</div>

<style>
.active {
color: green;
}
.inactive {
color: red;
}
</style>
```

```js
Expand Down

0 comments on commit 669662c

Please sign in to comment.