wix-storybook-utils
Version:
Utilities for automated component documentation within Storybook
48 lines (40 loc) • 979 B
text/typescript
import * as React from 'react';
import { Section } from './story-section';
export interface Example {
title?: string;
description?: string;
example?: string;
wide?: boolean;
figmaLink?: string;
}
export interface IncludedComponent {
category: string;
title: string;
optional?: boolean;
}
export interface StoryContent {
title?: string;
description?: string;
do?: string[];
dont?: string[];
includedComponents?: IncludedComponent[];
featureExamples?: Example[];
developerExamples?: Example[];
accessibilityExamples?: Example[];
commonUseCaseExamples?: Example[];
}
export interface Tab {
title: string;
type: string;
sections?: React.ReactNode[] | (JSX.Element[] & Section[]);
node?: React.ReactNode;
}
export interface Tabs {
design: Tab;
api: Tab;
testkit: Tab;
playground: Tab;
}
export type StoryExamples = Record<string, string>;
export type StoryDemo = React.ReactNode;
export type StoryTabs = (tabs: Tabs) => Tab[];