UNPKG

574 BTypeScriptView Raw
1import { FunctionComponent } from 'react';
2export declare enum SourceError {
3 NO_STORY = "There\u2019s no story here.",
4 SOURCE_UNAVAILABLE = "Oh no! The source is not available."
5}
6interface SourceErrorProps {
7 error?: SourceError;
8}
9interface SourceCodeProps {
10 language?: string;
11 code?: string;
12 format?: boolean;
13 dark?: boolean;
14}
15export declare type SourceProps = SourceErrorProps & SourceCodeProps;
16/**
17 * Syntax-highlighted source code for a component (or anything!)
18 */
19declare const Source: FunctionComponent<SourceProps>;
20export { Source };