1 | import { ComponentProps, FC } from 'react';
|
2 | import { Source as PureSource } from '@storybook/components';
|
3 | import { DocsContextProps } from './DocsContext';
|
4 | import { SourceContextProps } from './SourceContainer';
|
5 | export declare enum SourceState {
|
6 | OPEN = "open",
|
7 | CLOSED = "closed",
|
8 | NONE = "none"
|
9 | }
|
10 | interface CommonProps {
|
11 | language?: string;
|
12 | dark?: boolean;
|
13 | format?: PureSourceProps['format'];
|
14 | code?: string;
|
15 | }
|
16 | declare type SingleSourceProps = {
|
17 | id: string;
|
18 | } & CommonProps;
|
19 | declare type MultiSourceProps = {
|
20 | ids: string[];
|
21 | } & CommonProps;
|
22 | declare type CodeProps = {
|
23 | code: string;
|
24 | } & CommonProps;
|
25 | declare type NoneProps = CommonProps;
|
26 | declare type SourceProps = SingleSourceProps | MultiSourceProps | CodeProps | NoneProps;
|
27 | declare type SourceStateProps = {
|
28 | state: SourceState;
|
29 | };
|
30 | declare type PureSourceProps = ComponentProps<typeof PureSource>;
|
31 | export declare const getSourceProps: (props: SourceProps, docsContext: DocsContextProps<any>, sourceContext: SourceContextProps) => PureSourceProps & SourceStateProps;
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 | export declare const Source: FC<PureSourceProps>;
|
38 | export {};
|