Comments (2)
For 7.0? onwards, need to invoke decorator as a workaround.
// preview.tsx - example
import type { Preview } from '@storybook/react'
...
const preview: Preview = {
loaders: [
...
],
decorators: [
(Story) => {
...
},
withScreenshot(), // <== invoke
],
parameters: {
...
},
}
export default preview
seems to be deprecated though?
from storycap.
Thank you for the answer from one perspective.
But that won't be the solution.
Isn't it written in the official documentation as below?
γUsing withScreenshot as function is deprecated. γ
reference: https://github.com/reg-viz/storycap#withscreenshot
Because it should look like this:
// deprecated
decorators: [withScreenshot()],
And I do it like this.
However, I would like to avoid using any as much as possible.
// Solved with any
decorators: [withScreenshot as any],
from storycap.
Related Issues (20)
- Take both dark mode and light mode screenshot HOT 1
- Couldn't find a story matching 'object [Object]' HOT 1
- [Feat] Allow running chromium with headless=new
- navigator.pdfViewerEnabled seems to be disabled
- Add waitUntil option to support wait for networkidle0
- Failed to capture a screenshot for stories with click/focus options: Error: failed to find element matching selector HOT 1
- waitFor leads to timeout with storybook 7 HOT 4
- component triggered by storybook "play" is missing in the captured image
- no npm bin files published at [email protected] HOT 1
- no parsers registered for: "+(Act" when running storycap @storycap4 HOT 2
- [Question] Why capture whole page instead of element? HOT 1
- sometimes `disable-animation.css` might not applied as expected
- [Question] Why `waitBrowserMetricsStable` before considering `scOpt.skip`? HOT 2
- Navigation timeout of 30000 ms exceeded while waiting for stories definition HOT 1
- cli: -p doesn't work
- Error: failed to find element matching selector inside CapturingBrowser.resetIfTouched() HOT 1
- [Question] Can I use regex in the exclude option? HOT 1
- storybook 7 support? HOT 8
- Unreliable results with more than 1 for `--parallel`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storycap.