chromaui / addon-visual-tests

Visual Tests addon for Storybook
MIT License
28 stars 1 forks source link

Open addon panel when notification is clicked, and pass new `duration` option #281

Closed ghengeveld closed 3 months ago

ghengeveld commented 3 months ago

Fixes #264

This uses the new duration and onClick options for addNotification.

Most notifications will auto-close after 8 seconds. The original timeout mechanism is kept in place for backwards compatibility.

When a notification is clicked, the notification is dismissed and the VTA panel is opened/made visible.

To QA, run npx storybook@0.0.0-pr-26696-sha-63254fdd upgrade to get access to the updated notification API.

📦 Published PR as canary version: 1.3.0--canary.281.6e67049.0
:sparkles: Test out this PR locally via: ```bash npm install @chromatic-com/storybook@1.3.0--canary.281.6e67049.0 # or yarn add @chromatic-com/storybook@1.3.0--canary.281.6e67049.0 ```