Skip to content

[Documentation]: Globals page in API section #32380

@Sidnioulz

Description

@Sidnioulz

Describe the problem

Globals may need their own page alongside parameters, for two reasons:

  • it would give them the same level of importance as parameters and would help new users identify and compare both constructs
  • we'd have room to expand on how to useGlobals from preview vs MDX vs manager

Additional context

IIRC preview and manager have hooks for accessing and updating globals. This leads to a funky situation where MDX needs its own pattern (MDX cannot always run our API hooks).

https://storybook.js.org/docs/essentials/toolbars-and-globals#globals contains only some doc but not code examples from the perspective of every applicable code context.

#32362 provides a creative approach to use globals from MDX.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions