@hypothesis/frontend-shared
Version:
Shared components, styles and utilities for Hypothesis projects
37 lines (36 loc) • 1.48 kB
TypeScript
/**
* @typedef {import("./components/PlaygroundApp").PlaygroundRoute} PlaygroundRoute
*/
/**
* @typedef PatternLibraryAppOptions
* @prop {string} [baseURL] - The path relative to web root where the pattern
* library is served. Defaults to `/ui-playground`.
* @prop {PlaygroundRoute[]} [extraRoutes] - Local-/application-specific routes
* to add to this pattern library in addition to the shared/common routes
* @prop {Record<string, string>} [icons] - Icons, additional to default pattern-library icons,
* to register for use in patterns/components in the pattern library
*/
/**
* Render the pattern-library preact container
*
* @param {PatternLibraryAppOptions} options
*/
export function startApp({ baseURL, extraRoutes, icons }?: PatternLibraryAppOptions): void;
export type PlaygroundRoute = import("./components/PlaygroundApp").PlaygroundRoute;
export type PatternLibraryAppOptions = {
/**
* - The path relative to web root where the pattern
* library is served. Defaults to `/ui-playground`.
*/
baseURL?: string | undefined;
/**
* - Local-/application-specific routes
* to add to this pattern library in addition to the shared/common routes
*/
extraRoutes?: import("./routes").PlaygroundRoute[] | undefined;
/**
* - Icons, additional to default pattern-library icons,
* to register for use in patterns/components in the pattern library
*/
icons?: Record<string, string> | undefined;
};