mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
[storybook__addon-knobs] Update for v5 (#34691)
* Adds types for optionsKnob * Undo auto formatting * Update types/storybook__addon-knobs/index.d.ts Co-Authored-By: azmenak <adam.zmenak@gmail.com>
This commit is contained in:
committed by
Armando Aguirre
parent
1ca3d432ca
commit
e796eb7466
22
types/storybook__addon-knobs/index.d.ts
vendored
22
types/storybook__addon-knobs/index.d.ts
vendored
@@ -1,10 +1,11 @@
|
||||
// Type definitions for @storybook/addon-knobs 4.0
|
||||
// Type definitions for @storybook/addon-knobs 5.0
|
||||
// Project: https://github.com/storybooks/storybook, https://github.com/storybooks/storybook/tree/master/addons/knobs
|
||||
// Definitions by: Joscha Feth <https://github.com/joscha>
|
||||
// Martynas Kadisa <https://github.com/martynaskadisa>
|
||||
// A.MacLeay <https://github.com/amacleay>
|
||||
// Michael Loughry <https://github.com/MLoughry>
|
||||
// Alan Choi <https://github.com/alanhchoi>
|
||||
// Adam Zmenak <https://github.com/azmenak>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.0
|
||||
|
||||
@@ -65,6 +66,25 @@ export function array<T>(name: string, value: ReadonlyArray<T>, separator?: stri
|
||||
|
||||
export function button(name: string, handler: () => any, groupId?: string): void;
|
||||
|
||||
export interface OptionsKnobOptions {
|
||||
display?:
|
||||
| "radio"
|
||||
| "inline-radio"
|
||||
| "check"
|
||||
| "inline-check"
|
||||
| "select"
|
||||
| "multi-select";
|
||||
}
|
||||
|
||||
export function optionsKnob<T>(
|
||||
label: string,
|
||||
values: {
|
||||
[key: string]: T;
|
||||
},
|
||||
defaultValue?: T,
|
||||
options?: OptionsKnobOptions
|
||||
): T;
|
||||
|
||||
export interface WrapStoryProps {
|
||||
context?: object;
|
||||
storyFn?: RenderFunction;
|
||||
|
||||
Reference in New Issue
Block a user