Pages
Description
The Pages
component manages and renders a series of pages within a story.
It leverages multiple hooks to access and manage context values related to the viewer, pages, timer, and stories.
Additionally, it uses a hook to order and render its children elements, ensuring the correct sequence and transitions between pages.
Properties
Component
Prop | Type | Description |
---|---|---|
as | React.ElementType | Specifies the component type to render (by default, div ). |
...events | PaginationEvents | Optional callback events for component. |
...props | React.HTMLAttributes | Standard HTML attributes for an HTML element. |
Contexts Available
Usage
<Pages>
<Page>{...content}</Page>
<Page>{...content}</Page>
<Page>{...content}</Page>
{...pages}
</Pages>