@dump247/storybook-state
Advanced tools
Comparing version
@@ -23,3 +23,6 @@ import { Renderable, RenderFunction } from '@storybook/react'; | ||
export type StorybookStateCallback<T> = (store: Store<T>) => Renderable | Renderable[]; | ||
export function withState<T extends {}>(state: T, callback?: StorybookStateCallback<T>): any // RenderFunction; | ||
export type LegacyStorybookStateCallback<T> = (store: Store<T>) => Renderable | Renderable[]; | ||
export function withState<T extends {}>(state: T, callback: LegacyStorybookStateCallback<T>): any // RenderFunction; | ||
export type StorybookStateCallback<T> = (context: {store: Store<T>}) => Renderable | Renderable[]; | ||
export function withState<T extends {}>(state: T): (callback: StorybookStateCallback<T>) => any |
{ | ||
"name": "@dump247/storybook-state", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "Manage component state in storybook stories.", | ||
@@ -36,2 +36,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"enzyme-adapter-react-16": "^1.6.0", | ||
"react": "^16.6.0", | ||
"react-json-view": "^1.13.3" | ||
@@ -49,7 +51,7 @@ }, | ||
"enzyme": "^3.2.0", | ||
"enzyme-adapter-react-15": "^1.0.5", | ||
"enzyme-adapter-react-16": "^1.6.0", | ||
"jest": "^21.2.1", | ||
"react-dom": "^15.6.0", | ||
"react-test-renderer": "^15.6.2" | ||
"react-dom": "^16.0.0", | ||
"react-test-renderer": "^16.0.0" | ||
} | ||
} |
import React from 'react'; | ||
import { withState, Store } from './index'; | ||
import { mount, configure } from 'enzyme'; | ||
import Adapter from 'enzyme-adapter-react-15'; | ||
import Adapter from 'enzyme-adapter-react-16'; | ||
import addons from '@storybook/addons'; | ||
@@ -6,0 +6,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
31866
-91.63%6
50%15
-6.25%561
-94.57%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed