Configurable document type. By default, all documents are treated as story page types.
'story' | 'blog' | 'page' | 'tags' | 'author' | string;
defaults
property | story | blog | page | tags | author |
---|---|---|---|---|---|
basePath | docs/ | blogs/ | pages/ | tags/ | authors/ |
storyPaths | true | ||||
label | Docs | Blog | Page | Tags | Authors |
indexHome | true | ||||
layout.fullPage | |||||
layout.navSidebar | true | ||||
layout.contextSidebar | true | true | |||
topMenu | true | true | |||
container | |||||
tabs | { page: '@component-controls/pages/ClassicPage' } |
This is the webpack configuration object.
Story render function. The resolved control values are passed as the first argument and the story context is passed as the second argument.
function (controlValues
*: [key: string]: any, context
: any): any;
Name | Type | Description |
---|---|---|
basePath | string | base url path for the page |
container | ComponentType | null | page container react component |
fullPage | boolean | whether to take a fullpage theme option |
label | string | label - used for menu labels |
indexHome | boolean | whether to have an index home page for the document type. if false will show the first document of the document type as the home page. |
navSidebar | boolean | whether to add navigation sidebar to navigate all the pages of the same document type |
contextSidebar | boolean | whether to add context sidebar to navigate the sections on the page |
tabs | PageTabs | tabs configuration for story-type pages |
topMenu | boolean | whether to add to the top navigation menu |
Object of tab page configurations, the key is a string for the tab route.
story type pages can have multiple tabs with separate page configurations.
Name | Type | Description |
---|---|---|
template | string | ComponentType; |
route | string | tab route string |
title* | string | title will be used as tab caption |
type | string | page container type - a key into the component-controls/pages package |
an item in the ActionBar component
Name | Type | Description |
---|---|---|
node* | ReactNode | title - if a string, will use the built-in components, else can provide custom React component |
id | string | optional id, used if the title is not set |
href | string | if the title is a string and href is set will use a default <Link /> component |
onClick | (e) => void | if the title is a string and href is not set, onClick will be used on a <Button /> component |
hidden | boolean | hide an action item |
order | number | optional order, if not provided will use the natural order of items from right to left |
group | string | number |
aria-label | string | optional label visible to screen readers for aria accessibility |
panel | ReactNode | panel for Tab-enabled UI, where an action item can open up a panel with tabs, in this case, the onClick function can return true/false whether to open up the panel |
an array of action items
left and right-hand side toolbar configuration on the main screen
Name | Type | Description |
---|---|---|
left | ActionItems | left side toolbar items |
right | ActionItems | right side toolbar items |