Skip to content

Commit

Permalink
updated alignment changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ATREAY committed Oct 6, 2023
1 parent 0e0d01b commit 1d52a86
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/essentials/highlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ To highlight DOM elements with the addon, you'll need to emit the `HIGHLIGHT` ev

</div>

<div class="aside">

ℹ️ The `emit` function derived from the `useChannel` API hook creates a communication channel in Storybook's UI to listen for events and update the UI accordingly. The Highlight addon uses this channel to listen to custom events and update the highlighted elements (if any) accordingly.

</div>

### Reset highlighted elements

Out of the box, Storybook automatically removes highlighted elements when transitioning between stories. However, if you need to clear them manually, you can emit the `RESET_HIGHLIGHT` event from within a story or an addon. For example:
Expand All @@ -58,6 +52,12 @@ Out of the box, Storybook automatically removes highlighted elements when transi

<!-- prettier-ignore-end -->

<div class="aside">

ℹ️ The `emit` function derived from the `useChannel` API hook creates a communication channel in Storybook's UI to listen for events and update the UI accordingly. The Highlight addon uses this channel to listen to custom events and update the highlighted elements (if any) accordingly.

</div>

## Customize style

By default, the addon applies a standard style to the highlighted elements you've enabled for the story. However, you can enable your custom style by extending the payload object and providing a `color` and/or `style` properties. For example:
Expand Down

0 comments on commit 1d52a86

Please sign in to comment.