@hypothesis/frontend-shared
Version:
Shared components, styles and utilities for Hypothesis projects
33 lines (32 loc) • 1.07 kB
TypeScript
import 'preact/debug';
import type { CustomPlaygroundRoute } from './routes';
export type PlaygroundAppProps = {
/**
* The path relative to web root where the pattern library is served. Defaults
* to `/ui-playground`.
*/
baseURL?: string;
/**
* Application-specific routes to add to this pattern library in
* addition to the shared/common routes
*/
extraRoutes?: CustomPlaygroundRoute[];
/**
* Optional title to use as a header above any custom routes shown in the
* navigation menu. Default title is "Playground".
*/
extraRoutesTitle?: string;
};
export type PatternLibraryAppOptions = {
/**
* Icons, additional to default pattern-library icons, to register for use in
* patterns/components in the pattern library.
*
* @deprecated - Use individual icon components instead
*/
icons?: Record<string, string>;
} & PlaygroundAppProps;
/**
* Render the pattern-library preact app
*/
export declare function startApp({ ...componentProps }?: PatternLibraryAppOptions): void;