Skip to content

Commit

Permalink
Merge pull request #19047 from mandarini/fix/update-storybook-config-…
Browse files Browse the repository at this point in the history
…type

Core: Add previewHead and previewBody to StorybookConfig interface
  • Loading branch information
shilman authored Aug 30, 2022
2 parents c4bc348 + 8a8d8fa commit b63d349
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions code/lib/core-common/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,15 @@ export interface StorybookConfig {
* Docs related features in index generation
*/
docs?: DocsOptions;

/**
* Programmatically modify the preview head/body HTML.
* The previewHead and previewBody functions accept a string,
* which is the existing head/body, and return a modified string.
*/
previewHead?: (head: string, options: Options) => string;

previewBody?: (body: string, options: Options) => string;
}

export type PresetProperty<K, TStorybookConfig = StorybookConfig> =
Expand Down

0 comments on commit b63d349

Please sign in to comment.