mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 15:31:16 +08:00
27 lines
746 B
Plaintext
27 lines
746 B
Plaintext
---
|
|
title: 'managerHead'
|
|
sidebar:
|
|
order: 14
|
|
title: managerHead
|
|
---
|
|
|
|
Parent: [main.js|ts configuration](./main-config.mdx)
|
|
|
|
Type: `(head: string) => string`
|
|
|
|
Programmatically adjust the manager's `<head>` of your Storybook. For example, load a custom font or add a script. Most often used by [addon authors](../../addons/writing-presets.mdx#ui-configuration).
|
|
|
|
<Callout variant="info" icon="💡">
|
|
|
|
If you don't need to programmatically adjust the manager head, you can add scripts and styles to `manager-head.html` instead.
|
|
|
|
</Callout>
|
|
|
|
For example, you can conditionally add scripts or styles, depending on the environment:
|
|
|
|
{/* prettier-ignore-start */}
|
|
|
|
<CodeSnippets path="main-config-manager-head.md" />
|
|
|
|
{/* prettier-ignore-end */}
|