mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-01 05:05:25 +08:00
Fixes
This commit is contained in:
parent
d98b616979
commit
756f74cec0
@ -1,7 +1,7 @@
|
||||
/* eslint-disable react/prop-types */
|
||||
import React from 'react';
|
||||
import 'nextra-theme-docs/style.css';
|
||||
import { ExternalDocs, ExternalDocsContainer } from '@storybook/addon-docs';
|
||||
import { ExternalDocs } from '@storybook/addon-docs';
|
||||
|
||||
import * as reactAnnotations from '@storybook/react/preview';
|
||||
import * as previewAnnotations from '../.storybook/preview';
|
||||
|
@ -1,6 +1,9 @@
|
||||
import React, { FunctionComponent, ComponentType } from 'react';
|
||||
import { AnyFramework, Parameters } from '@storybook/csf';
|
||||
import { DocsContextProps } from './DocsContext';
|
||||
import React from 'react';
|
||||
import type { FunctionComponent, ComponentType } from 'react';
|
||||
import type { AnyFramework, Parameters } from '@storybook/csf';
|
||||
import type { Theme } from '@storybook/theming';
|
||||
|
||||
import type { DocsContextProps } from './DocsContext';
|
||||
import { DocsContainer } from './DocsContainer';
|
||||
import { DocsPage } from './DocsPage';
|
||||
|
||||
@ -10,7 +13,7 @@ export type DocsProps<TFramework extends AnyFramework = AnyFramework> = {
|
||||
};
|
||||
|
||||
export const Docs: FunctionComponent<DocsProps> = ({ parameters, context }) => {
|
||||
const Container: ComponentType<{ context: DocsContextProps }> =
|
||||
const Container: ComponentType<{ context: DocsContextProps; theme: Theme }> =
|
||||
parameters.container || DocsContainer;
|
||||
|
||||
const Page = parameters.page || DocsPage;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { FunctionComponent, useEffect } from 'react';
|
||||
import global from 'global';
|
||||
import type { Theme } from '@storybook/theming';
|
||||
import type { ThemeVars } from '@storybook/theming';
|
||||
import { ThemeProvider, ensure as ensureTheme } from '@storybook/theming';
|
||||
import { AnyFramework } from '@storybook/csf';
|
||||
import { DocsWrapper, DocsContent } from '../components';
|
||||
@ -12,7 +12,7 @@ const { document, window: globalWindow } = global;
|
||||
|
||||
export interface DocsContainerProps<TFramework extends AnyFramework = AnyFramework> {
|
||||
context: DocsContextProps<TFramework>;
|
||||
theme?: Theme;
|
||||
theme?: ThemeVars;
|
||||
}
|
||||
|
||||
export const DocsContainer: FunctionComponent<DocsContainerProps> = ({
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { FunctionComponent, ComponentType, useRef } from 'react';
|
||||
import React, { FunctionComponent, useRef } from 'react';
|
||||
import { AnyFramework, ProjectAnnotations } from '@storybook/csf';
|
||||
import { composeConfigs } from '@storybook/store';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user