Skip to main content

Variable: storyHelpers

const storyHelpers: StoryHelpers

Defined in: packages/core/src/passages/story/helpers.ts:185

Story component builders.

Normally received as the first argument of a defineStory content callback. Import it directly when a story is split across several files and the helpers are needed outside of the callback body.

Example

import { defineStory, storyHelpers } from '@react-text-game/core';

const intro = () => [storyHelpers.header('The Whispering Woods')];

defineStory('forest', (h) => [...intro(), h.text('The forest is alive.')]);