@component-controls/nextjs-plugin

Nextjs plugin to create stories documentation sites

Usage no npm install needed!

<script type="module">
  import componentControlsNextjsPlugin from 'https://cdn.skypack.dev/@component-controls/nextjs-plugin';
</script>

README

Table of contents

In action

Live site

Overview

Next.js plugin for documenting your projects with component controls

  • Exports building and store interfaces.
  • Exports generic Layout component.

Getting started with nextjs

API

FC

type

defined in @types/react/types/react/index.d.ts

properties

Name Type Parent
propTypes WeakValidationMap<> | undefined FunctionComponent
contextTypes ValidationMap<> | undefined FunctionComponent
defaultProps Partial<P> | undefined FunctionComponent
displayName string | undefined FunctionComponent

getIndexPage

function

defined in @component-controls/nextjs-plugin/integrations/nextjs-plugin/src/page-links.ts

parameters

Name Type
returns ReturnType<>

getHomePagesPaths

function

defined in @component-controls/nextjs-plugin/integrations/nextjs-plugin/src/page-links.ts

parameters

Name Type
returns string[]

getDocHomePage

function

defined in @component-controls/nextjs-plugin/integrations/nextjs-plugin/src/page-links.ts

parameters

Name Type
path* string
returns
DocHomePagesPath
type: "story" | "blog" | "page" | "tags" | "author" | string
path*: string
docId: string
storyId: string
lastModified: string
docIndex: boolean

getDocPagesPaths

function

defined in @component-controls/nextjs-plugin/integrations/nextjs-plugin/src/page-links.ts

parameters

Name Type
returns string[]

getDocPage

function

defined in @component-controls/nextjs-plugin/integrations/nextjs-plugin/src/page-links.ts

parameters

Name Type
docType* "story" | "blog" | "page" | "tags" | "author" | string
docId* string[]
returns
DocPagesPath
type: DocType
path*: string
query: string
lastModified: string
docId: string
storyId: string
category: string
activeTab: string